Solved – Linear mixed model: Time as continuous or discrete variable

continuous timediscrete timemixed modelspss

I am analysing a dataset from a randomised controlled trial (2 treatment groups) with measurements at 3 time points (weeks 0, 1 and 8). I am struggling with whether to analyse this with the three time points as a continuous or categorical variable.

My reasoning to classify as continuous would be to account for the differently spaced time periods between the visits. But this would assume the influence of time is a linear one. This becomes a problem for some of the dependent variables that sharply increase from week 0 to week 1, but then decrease from week 1 to week 8.

Would it make more sense to run the model with time as a categorical variable or to include a quadratic time variable and run it as continuous? Both approaches seem to depict the actual observation when plotting the predicted values as a graph.

Best Answer

The problem with using it as a categorical variable, presumably you're going to include then a coefficient for each timepoint, while with the continuous one, at least if it's linear, there are only 2 extra coefficients. These are multiplied if you have interactions with time as well. Off course, the model with a coefficient for each timepoint will fit the data better, but you have extra variables for it. You could compare with AIC (or crossvalidation, depending on the scale) which one is better. But categorical to me only makes sense if the three timepoints have nothing to do with each other in terms of consecutive timepoints. With categorical they are just three timepoints with independent errors.

The right answer will thus also depend on the actual problem. What happens to the participants in between? Any reason to think time would have a linear of quadratic effect? Any reason the three timepoints do not have any particular ordering information between them?

Related Question