Skip to content
Prev 299527 / 398503 Next

anova.lm and F-test

Hello,

Why does anova.lm sometimes return a p-value and at other times  not ? Is  
it because it recognizes nested models from non-nested ones ?
Analysis of Variance Table

Model 1: y ~ x
Model 2: y ~ x + I(x^2)
   Res.Df    RSS Df Sum of Sq      F Pr(>F)
1     98 90.449
2     97 90.288  1   0.16117 0.1732 0.6782
Analysis of Variance Table

Model 1: y ~ x
Model 2: y ~ I(x^2) + I(x^3)
   Res.Df    RSS Df Sum of Sq F Pr(>F)
1     98   90.4
2     97 7345.7  1   -7255.3

Thanks, Suresh