Describe 襷_蠏覿 here
R 蠏覿 lm()襯 伎. women 一危磯ゼ 伎伎 蠏 覿(simple regression) 企慨.
> data(women)
> model = lm(weight ~ height, women)
lm(weight ~ height,women) 譬覲襯 weight, 襴暑襯 height襦 れ 蟆企. 蠏碁襯 蠏碁る慨. plot 一襯 蠏碁Μ螻 abline 蠏覿 蟆郁骸襯 螳讌螻 讌 蠏碁れ.
> plot(weight ~ height, women)
> abline(model)
覿 蟆郁骸襯 覲願 矩る summary襯 .
> summary(model)
Call:
lm(formula = weight ~ height, data = women)
Residuals:
Min 1Q Median 3Q Max
-1.7333 -1.1333 -0.3833 0.7417 3.1167
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -87.51667 5.93694 -14.74 1.71e-09 ***
height 3.45000 0.09114 37.85 1.09e-14 ***
---
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1
Residual standard error: 1.525 on 13 degrees of freedom
Multiple R-Squared: 0.991, Adjusted R-squared: 0.9903
F-statistic: 1433 on 1 and 13 DF, p-value: 1.091e-14
覿磯 anova() 襯 . 覿磯 aov るゴる .
> anova(model)
Analysis of Variance Table
Response: weight
Df Sum Sq Mean Sq F value Pr(>F)
height 1 3332.7 3332.7 1433.0 1.091e-14 ***
Residuals 13 30.2 2.3
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1