[R-sig-ME] mixed models with time as an ordered factor

dlmcarthur at post.harvard.edu dlmcarthur at post.harvard.edu
Mon Aug 10 04:32:54 CEST 2009


Reposting from Wed Aug 5 (since original text got scrubbed):

For examining the shape of repeated responses over time, if time is 
specified as an ordered factor then can at least the lower orders 
(linear, quadratic, cubic...) and their interactions that emerge from 
the mixed model analysis be interpreted directly?

What to make of the differences in AIC, BIC, and random effect 
variance, from the model that does not declare time as an ordered factor?

How best to think about those degrees of freedom?

Or is there some preferred alternate strategy?

dF <- as.data.frame(cbind(rep(1:50,rep(5,50)), rep(1:2,rep(5,2)), 
rnorm(1:250), rep(1:5,50)))
names(dF) <- c('respondent', 'group', 'measure', 'time')
m.time_not_ordered <- lme(measure~group*time, random=~1|respondent, 
data=dF, method='ML')
m.time_ordered <- lme(measure~group*ordered(factor(time)), 
random=~1|respondent, data=dF, method='ML')

Many thanks - Dave McArthur




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