A variable is measured repeatedly within a study (e. g. blood sugar levels every day over the course of two weeks while patients are giving a specific treatment). There are also two follow-up measurements three and six months later, they do not include any treatment and are just to determine if effects are still visible after a few months.

Do I need to take into account that the first 14 measurements were taken on consecutive days (and within a short time frame) but the follow-ups were conducted vastly later? My model looks like this

lme(level ~ treatment * session, data, random = ~ 1 + session | ID, method = "REML"))

and I am interested in how the blood sugar levels change over time depending on specific treatments and whether the changes are still measurable during follow-ups.

In this case, session would now include numbers (from 1 to 16) for each measurement point. This way, there is no indication how far the measurement points are away from each other. Would this be necessary?

  • 1
    $\begingroup$ Either session should be a factor variable or it should be days since start of the study. For the latter, you model would assume a linear trend which might not be justified. You should first plot the data and visualize the trends for each treatment. A mgcv::gam model might be more appropriate if the trend is not linear. Alternatively, I would consider including time since start of study as an autocorrelation covariate (see package nlme) instead of a fixed effect. $\endgroup$ – Roland Jul 30 '18 at 11:10
  • $\begingroup$ The plotted values are pretty much linear, that is why I want to go with a model like this. If I recode session as a factor, R computes forever and basically freezes without generating output... $\endgroup$ – The Dentist Jul 31 '18 at 9:47

Your Answer


Browse other questions tagged or ask your own question.