Information Technology Reference
In-Depth Information
There are also specialized extractor functions for other important information:
Model coefficients (point estimates)
> coef(m)
(Intercept) u v w
1.4222050 1.0358725 0.9217432 0.7260653
Confidence intervals for model coefficients
> confint(m)
2.5 % 97.5 %
(Intercept) -1.46302727 4.307437
u 0.45805053 1.613694
v 0.14332834 1.700158
w -0.02466125 1.476792
Model residuals
> resid(m)
1 2 3 4 5 6
-1.41440465 1.55535335 -0.71853222 -2.22308948 -0.60201283 -0.96217874
7 8 9 10 11 12
-1.52877080 0.12587924 -0.03313637 0.34017869 1.28200521 -0.90242817
13 14 15 16 17 18
2.04481731 1.13630451 -1.19766679 -0.60210494 1.79964497 1.25941264
19 20 21 22 23 24
-2.03323530 1.40337142 -1.25605632 -0.84860707 -0.47307439 -0.76335244
25 26 27 28 29 30
2.16275214 1.53483492 1.65085364 -3.39647629 -0.46853750 3.12825629
Residual sum of squares
> deviance(m)
[1] 68.69616
ANOVA table
> anova(m)
Analysis of Variance Table
Response: y
Df Sum Sq Mean Sq F value Pr(>F)
u 1 27.916 27.9165 10.5658 0.003178 **
v 1 29.830 29.8299 11.2900 0.002416 **
w 1 10.442 10.4423 3.9522 0.057436 .
Residuals 26 68.696 2.6422
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
If you find it annoying to save the model in a variable, you are welcome to use one-
liners such as this:
> summary(lm(y ~ u + v + w))
 
Search WWH ::




Custom Search