[R-sig-ME] Wrong degrees of freedom in nested model, what goes wrong here?

Mark Lyman mark.lyman at atk.com
Wed Oct 1 18:46:44 CEST 2008


Marvelde, Luc te <L.teMarvelde at ...> writes:

> so, a first simple model i think i have to run (but please say so if you 
disagree), is this:
> 
> model1<-lme(TFoodhrC ~ age + age2 + STATUS ,random=~1|nest/birdid/age, 
method="ML", data=r))
> # I used the method="ML" to be able to compare models using anova(model1, 
model2)
> # Model1  fits a non-linear effect of age with an additive effect of status
> 
> Here we expect both age and age2 to have 1 df and each STATUS-group will have 
1 df as well (which makes 4 df for
> the factor STATUS with its 5 levels)... right?
  
> Both age and age2 have 266 df here and STATUS even 71 each! I dont know what 
is going wrong here. 
> 
> Can anyone see what goes wrong here?
> 
> Many many thanks in advance!
> 
> Luc te Marvelde
> 

Try anova(model1) and see if that sheds some light on what you are seeing.

Mark Lyman




More information about the R-sig-mixed-models mailing list