[R] Linear mixed effects model ?

Dieter Menne dieter.menne at menne-biomed.de
Tue Oct 6 17:26:20 CEST 2009




Daniel Perkins wrote:
> 
> 
> Ideally we would do an ANCOVA to test for differences in slope or 
> intercepts for the different streams. However as there were repeated 
> measures and unequal n and unbalanced design, I have used a linear mixed 
> effect model (from nlme package in R) in the form:
> 
> model <- lme (Rate ~ Temp* Stream, random = ~ Time|Replicate)
> 
> 

This should rather be

model <- lme (Rate ~ Temp* Stream, random = ~ 1|Time/Replicate)

Always start your model with the more parsimonious "equal slopes" assumption
denoted by 1|. When you place the Time variable as you did, it estimates
separate slopes for Time, which could be ill conditioned.

Dieter



-- 
View this message in context: http://www.nabble.com/Linear-mixed-effects-model---tp25767907p25770925.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list