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.


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?

  • 1
    $\begingroup$ Participants are assigned to either receive placebo or an intervention at time point 0. Weeks 1 & 8 serve as a short-term and slightly longer-term follow up. I do know that, as mentioned, in the intervention group, my measured variable will increase initially and then decrease as a consequence of the intervention. So the effect is definitely not linear. By looking at the data visually it is obvious that the two groups differ over time, but with a simple treatment*time interaction and time as a continuos variable I do get a non-significant result due to the linear fit of the intervention group. $\endgroup$ – PeterS Oct 22 '17 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.