I would like to closely reproduce a model fit via generalized least square method with unstructured residual covariance by using a mixed model.

Which mixed model is closest to GLS with unstructured covariance? Random intercept + slopes or random slopes only? If if both - correlated or not?

Let's assume it's about repeated observations over time across two groups: Treatment A and Treatment B, where Time is categorical: T1, T2, T3, T4

Treatment is a fixed effect. Time is a fixed effect. Subject ID is the random effect.

We can consider the following options and I am curious which one is the best:

  1. random intercept only: NO, because I expect different correlations over time for each subject, not the same. This rather refers to a compound symmetry, which is not of my interest.

  2. random slope only: ? I expect different correlations over time for each subject, but they start from a similar conditions. In randomized trial it may be pretty sensible approach, isn't it?

  3. random slope and random intercept uncorrelated: ? I expect different correlations but subjects may start from different conditions. The initial conditions do not have to be linked to the further correlations. I have a randomization, so I'm wondering about the random intercept here, but maybe this approach is anyway worthwhile?

  4. random slope and random intercept correlated: ? As above, I expect different correlations and subjects start from different conditions and maybe the initial conditions are somehow related to the correlations. I am not sure. This seems to be the most advanced approach, but maybe too complex?

I expect there may be no clear translation from the G (random effects) correlations to R (residual) correlations, but I think the random slopes or random slopes + random intercepts seem closest to unstructured covariance (no constraints). But which one?


1 Answer 1


Suppose we have the linear mixed model $$y_i = X_i\beta + Z_i b_i + \varepsilon_i,$$ with $b_i \sim \mathcal N(0, D)$, and $\varepsilon_i \sim \mathcal N(0, \sigma^2 I)$. By using random effects, you imply the following structure for the marginal covariance matrix: $$V_i = Z_i D Z_i^\top + \sigma^2 I.$$ Hence, if you would like $V_i$ to become an unstructured matrix, you would need to consider a suitable version for the random-effects design matrix $Z_i$. An option is to include a separate random effect per time point (though there could be a small identifiability issue with $\sigma^2$).

If you want to understand more how random intercepts and random slopes (or event quadratic random slopes) affect the marginal correlations, check Chapter 3, Section 3.3 in this app: https://emcbiostatistics.shinyapps.io/Repeated_Measurements/

  • $\begingroup$ Thank you! Indeed I checked it now (great application, anyway - you made so much effort in visualising it all, and it works!) and it seems that I need both intercept and time. I created a topic, where I asked whether it's better to fit (Time + 0|ID) vs. (Time | ID). I saw once, that someone tried to reproduce the GLS + unstructured with (Time + 0|ID) and I was very curious why the random intercepts aren't of interest in this case... Could you help me here, please? stats.stackexchange.com/questions/570228/… $\endgroup$
    – Tereira
    Apr 7, 2022 at 16:03

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.