I don't quite understand what the p-value in this output means. I don't mean p-values as such, but in this case.
> Model 1: sl ~ le + ky
> Model 2: sl ~ le
Res.Df RSS Df Sum of Sq F Pr(>F)
1 97 0.51113
2 98 0.51211 -1 -0.00097796 0.1856 0.6676
I get something like that, and now I am wondering which model is the better fit. As there is only ONE and not TWO p-values I'm getting confused. I get different pvalues using summary(model1) or summary(model2)
Now if
> fm2<-lm(Y~X+T)
(T being my indicator variable) and
> fm4<-lm(Y~X)
if I do
> anova(fm2,fm4)
this tests the null hypothesis H0: alpha1==alpha2
(Ha: alpha1!=alpha2)
c(alpha being my intercept)
So it is tested whether it is better to have one intercept (=> alpha1==alpha2
), or two intercepts (alpha1!=alpha2
)
In this case we would now obviously reject the null Hypotheses, as the p-value is 0.6676.
This would mean we should rather stick with model fm4
, as it is more appropriate for our data.
Did I draw the conclusions right? I tried my very best, but I am not sure what the p-value means. As there is only on, this is what I thought it might mean. Can someone clear things up?