[R-sig-ME] mixed models with time as an ordered factor
Viechtbauer Wolfgang (STAT)
Wolfgang.Viechtbauer at stat.unimaas.nl
Mon Aug 10 18:06:24 CEST 2009
Well, first of all, the m.time_ordered model essentially gives a separate parameter for each group and each time point (2 * 5 = 10 fixed effects parameters). So, this is a saturated model, where the observed means per group and time point will be equal to the fitted means. The fit of that model will be exactly the same as using time as an unordered factor:
m.time_factor <- lme(measure~group*factor(time), random=~1|respondent, data=dF, method='ML')
The m.time_not_ordered is different, in that is assumes a linear relationship over time (that is allowed to differ in intercept and slope for the two groups).
By using time as an ordered factor, we get polynomial contrasts. So, the linear term and the linear by group interaction essentially reflect the same effects as the time and time by group interaction in the m.time_not_ordered model. However, due to the presence of the higher order terms, the results will be (slightly) different.
And, not surprisingly, the AIC, BIC, and intercept variance will also be different. Especially the AIC and BIC, which are strongly affected by the number of parameters in the model, will change noticeably.
Not sure if that helps.
Best,
--
Wolfgang Viechtbauer
Department of Methodology and Statistics
School for Public Health and Primary Care
University of Maastricht, The Netherlands
http://www.wvbauer.com/
----Original Message----
From: r-sig-mixed-models-bounces at r-project.org
[mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of
dlmcarthur at post.harvard.edu Sent: Monday, August 10, 2009 04:33 To:
r-sig-mixed-models at r-project.org Subject: [R-sig-ME] mixed models with time
as an ordered factor
> 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
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
More information about the R-sig-mixed-models
mailing list