Let's say I have a longitudinal study, with patients assessed at several time points, which goal is to compare the treatment vs. placebo.

If, theoretically, I used a mixed model to analyse the difference over time, should I include only the random slopes for time without random intercepts?

My reasoning is as follows. Random slopes allows each patient to have own regression line over time, which accounts for different within-patient correlation over time (does it, indeed, or should I consider also some residual covariance?)

But random intercepts allow each patient to vary in the outcome of interest at baseline, which is out of interest in randomized trials. And since my patients are randomized and all start from comparably same levels of this outcome, allowing them for random intercepts is like comparing the baseline outcomes between the arms seems to make no sense at all.

Thus, if I want to use the lme4::lmer4 package to model it, should I use specification formula: Response ~ Time + (Time + 0 | ID) rather than Response ~ Time + (Time|ID)?

Am I right about this reasoning?

  • 2
    $\begingroup$ I don't really buy the reasoning. The fact is that patients really do vary at baseline. It seems odd to me to allow for heterogeneity in the response at time $t>0$, but not at $t=0$. I don't really see a good reason to prefer $t=0$ to be treated differently. $\endgroup$ Commented Apr 12, 2022 at 19:44
  • $\begingroup$ In randomized trials, any changes at t=0 are ignored by definition of randomization even if they exist observably - treated as an artefact and ignored. We must not test them by any tests, because this is pointless. They all come from a single population there. That's why I guess it should work also for mixed models. $\endgroup$ Commented Apr 13, 2022 at 0:43
  • $\begingroup$ Is this a cross-over design? $\endgroup$
    – Todd D
    Commented Apr 13, 2022 at 3:36
  • $\begingroup$ @Re-searcher The difference conditioned on group membership is not to be tested, but there are differences between patients (ignoring group membership). Modelling that difference seems like a good idea, especially if you are using repeated measures. $\endgroup$ Commented Apr 13, 2022 at 4:08

1 Answer 1


The standard model for this that is commonly used in randomized controlled trials (RCTs) is response ~ 1 + treatment as factor + visit as factor + baseline (pre-treatment) value + visit as factor : baseline (pre-treatment) value + visit as factor : treatment as factor with an unstructured covariance matrix between visits. You will find many examples of this when searching for "MMRM" or "Mixed effects model for repeated measures". Anything else like just using random effects on intercepts or slopes, which implies an extremely strong assumption on correlation structure over time, would seem to need careful justification.

As pointed out by others, patients do differ and artificially restricting the model to not reflect this seems questionable. The unstructured covariance matrix for the residuals within a patient can also be expressed as having a random effect on each of the $V$ visit for a patient, within a $V \times V$ covariance matrix between these visits (while a "standard" random patient effect on the intercept would imply that all visits equally correlated). You also want to put the baseline measurement of the outcome of interest into your model and allow its influence to be different for each visit (=interaction term with visit).

Note also that these types of models will implicitly perform missing data imputation under a particular estimand that may not match your estimand of interest for the RCT.

  • $\begingroup$ Thank you. I mistakenly omit the Treatment. I meant Change_from_baseline ~ Baseline + Treatment * Time. I see you also interact the time x baseline value, I didn't know that, thanks! Yes, I could use the GEE in spirit of MMRM with unstructured cov (GLS had violated assumptions), which didn't converge, so I had to simplify it to exchangeable. But the problem is R has no Kenward-Roger adjustment for MMRM. Only for mixed models via lme4. So I need to mimic the marginal MMRM with a conditional mixed model. Thus I'm trying to determine the structure of random effects: (Time|ID|) vs. (0+Time|ID). $\endgroup$ Commented Apr 13, 2022 at 0:49
  • $\begingroup$ I thought the foundation of randomized trials, that is any changes at t=0 are ignored by definition of randomization even if they exist observably - treated as an artefact and ignored, will apply also here. That's why I proposed (0+Time|ID) to highlight the fact, they start from the same population. By definition here their differences are just random noise. $\endgroup$ Commented Apr 13, 2022 at 0:58
  • $\begingroup$ I strongly suspect that you will be able to do simulations under moderately simple scenarios (i.e. simulate correlated data over time with correlation declining in time, but of course not to 0 like in something absurd like AR(1), with variation at baseline and inclusion criteria being applied at baseline) that result in pretty bad type 1 error inflation for testing the null hyp. of no treatment difference at the final visit with the approach you describe.I believe there's some material on how to do MMRM in R that you can find online (I vaguely recall that it's by some statisticians at Roche). $\endgroup$
    – Björn
    Commented Apr 13, 2022 at 6:01
  • $\begingroup$ Thank you. I found the PDF presentation on the LinkedIn portal. They use exactly the (0+Time|ID) construct, no random intercepts too. So it seems that someone at Roche follows this logic, but they don't tell why, so I'm very curious for the justification: linkedin.com/pulse/… $\endgroup$ Commented Apr 13, 2022 at 7:17
  • $\begingroup$ Note that they use lmer(y ~ treatment + visit + (0 + visit | id), ..., control = lmerControl(check.nobs.vs.nRE = “ignore”)) with categorical visit. If there's V visits the code induces a V-dimensional random effect (one dimension per visit) for each patient, which are allowed to be correlated in an arbitrary fashion (it's of course equivalent to have a random intercept and random effects for V-1 of the visits). In contrast, that would not be the case with a random effect on a continuous time variable. $\endgroup$
    – Björn
    Commented Apr 14, 2022 at 10:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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