Skip to content
Prev 14713 / 20628 Next

Repeated measures with a non-linear time effect

Hi?J?rg,
Unfortunately setting time as integer doesn't change anything whereas setting it as a factor means that the number of random effects will be equal to the number of samples.
Perhaps this is an alternative:fit1 <- gls(measure~time*group,correlation=corSymm(form=~1|subject),weight=varIdent(form=~1|time),data=df)
as it does capture the group and interaction effects but I think I need to contrast it with a null model and I'm not sure what would that null model be.
Any idea?
On Thursday, July 21, 2016 3:27 PM, J?rg Albrecht <albrechj at staff.uni-marburg.de> wrote:
Hi Dan,

most likely the model treats your time covariate as a continuous predictor. Try str(df), then time should appear as integer (int). If you specify time as a factor (with three levels: 1, 2, 3) the model will be able to estimate the time x treatment interaction separately for each time point. However, you still have to decide whether treating time as a factorial variable makes sense for your dataset.

Best,

J?rg