इस उदाहरण पर विचार करें:
set.seed(5) # this line will allow you to run these commands on your
# own computer & get *exactly* the same output
x = rnorm(50)
y = rnorm(50)
fit = lm(y~x)
summary(fit)
# Call:
# lm(formula = y ~ x)
#
# Residuals:
# Min 1Q Median 3Q Max
# -2.04003 -0.43414 -0.04609 0.50807 2.48728
#
# Coefficients:
# Estimate Std. Error t value Pr(>|t|)
# (Intercept) -0.00761 0.11554 -0.066 0.948
# x 0.09156 0.10901 0.840 0.405
#
# Residual standard error: 0.8155 on 48 degrees of freedom
# Multiple R-squared: 0.01449, Adjusted R-squared: -0.006046
# F-statistic: 0.7055 on 1 and 48 DF, p-value: 0.4051
प्रश्न, मैं अनुमान लगा रहा हूं, यह है कि आर के सारांश आउटपुट से प्रतिगमन समीकरण का कैसे पता लगाया जाए। बीजगणित, एक सरल प्रतिगमन मॉडल के लिए समीकरण
y^मैं= β^0+ β^1एक्समैं+ ε^मैंजहां ε ~ एन( 0 , σ ^2)
हम सिर्फ मैप करने की आवश्यकता
summary.lm()
इन शर्तों से उत्पादन। अर्थात:
- β^0
Estimate
(Intercept)
-0.00761
- β^1
Estimate
x
0.09156
- σ^
Residual standard error
0.8155
y^मैं= - 0.00761 + 0.09156 x मैं + ε ^मैंजहां ε ~ एन( 0 , 0.8155 2)
lm
और रैखिक मॉडल आमतौर पर अधिक, लेकिन यह बिल्कुल स्पष्ट नहीं है कि वास्तव में, आप क्या चाहते हैं। क्या आप एक उदाहरण या कुछ स्पष्ट करने के लिए दे सकते हैं? क्या यह किसी विषय के लिए है?