[R] nested design

Mark Difford mark_difford at yahoo.co.uk
Mon Jun 5 11:32:29 CEST 2006


Jorn,

For your model,

model<-lme(Biomass~Age,random=~1|Age/Stand)

think about nesting age in stand (doesn't that makes more sense, anyway ?).  If you're lucky the NaN will zip.  So, do

model <- lme( Biomass ~ Age, random = ~ 1 | Stand/Age

I've had a similar problem with unbalanced data when I've tried to nest Season%in%Site (which is what I wanted), with Site as a fixed effect as well.  Then, like you, I've got NaN's for my Site(s).  Changing the nesting to Site%in%Season has fixed the problem.  However, random effects are now being specified somewhat differently.  Hopefully a statistician will come in and tell you and me quite what the difference is, because I get lost in the logic of it.

Note that lmer() copes with the problematic Season%in%Site nesting without problems, using the same dataset.


Regards,
Mark

------------------------------------------------------------ 
Mark DiffordPh.D. candidate, Botany Department,
Nelson Mandela Metropolitan University,
Port Elizabeth, SA.



More information about the R-help mailing list