Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > mod1=lm(mpg~poly(disp,2)+hp+cyl,data=mtcars)
- > mod2=lm(mpg~poly(disp,3)+hp+cyl,data=mtcars)
- > anova(mod1,mod2)
- Analysis of Variance Table
- Model 1: mpg ~ poly(disp, 2) + hp + cyl
- Model 2: mpg ~ poly(disp, 3) + hp + cyl
- Res.Df RSS Df Sum of Sq F Pr(>F)
- 1 27 222.5
- 2 26 106.1 1 116.41 28.526 1.369e-05 ***
- ---
- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement