Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. > mod1=lm(mpg~poly(disp,2)+hp+cyl,data=mtcars)
  2. > mod2=lm(mpg~poly(disp,3)+hp+cyl,data=mtcars)
  3. > anova(mod1,mod2)
  4.  
  5. Analysis of Variance Table
  6.  
  7. Model 1: mpg ~ poly(disp, 2) + hp + cyl
  8. Model 2: mpg ~ poly(disp, 3) + hp + cyl
  9. Res.Df RSS Df Sum of Sq F Pr(>F)
  10. 1 27 222.5
  11. 2 26 106.1 1 116.41 28.526 1.369e-05 ***
  12. ---
  13. Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement