What would be the purpose of including a grouping variable in random effects in a mixed model

mixed modelpanel datarandom-effects-model

I am testing the effect of a randomized intervention on anxiety over 5 time points, using growth curve analysis via mixed modeling. The two levels of the intervention variable are an enhanced brief counseling session (experimental condition) and a brief educational session (treatment as usual condition) (heretofore referred to as "Group"). I have landed on the following model thus far:

  • Fixed effects: Intercept, Linear time, Quadratic time, Group, Group x Linear Time, Group x Quadratic Time
  • Random effects (unstructured covariance matrix): Intercept, Linear time, Quadratic time

In terms of what got me here, I started out with an unconditional means model and progressively added in additional terms (in this order: fixed linear time, random linear time, fixed quadratic time, random quadratic time, fixed cubic time, random cubic time). At each step, I ran a -2 log likelihood ratio chi squared test comparing to the prior smaller model, as well as looked at the fixed effects for the time terms (and the size of the random effects variances, to a lesser degree). Up through random quadratic time, each newly added term produced statistically significant log likelihood ratio test results, and the fixed and random effects suggested that those terms were meaningful to include. The model with fixed cubic time did not seem to yield improvement (and the one with random cubic time did not converge) so I stopped on the addition of random quadratic time. Using the random quadratic time model, I tested out alternative covariance structures (AR1, TP, TPH, CS), but they all had convergence errors, so I stuck with unstructured. I then added Group, Group x Linear Time, and Group x Quadratic Time to the fixed effects. Both of my Group x Time interaction terms are statistically significant, and the Group main effect is not, which makes sense.

Is there a reason that I would want to include Group x Time as a random effect, vs. only keeping it in the fixed effects portion of the model? My data does not actually support a model with such additional random effects (got a convergence error when I tried), but I want to understand whether such a modeling choice would be good to consider, if the data did support it. In my mind, it would make sense that it could be good to include such terms as random effects, since it logically could be the case that people might have some degree of variation in their response to a counseling session or an education session.

Best Answer

Is there a reason that I would want to include Group x Time as a random effect, vs. only keeping it in the fixed effects portion of the model?

Yes, if you have strong theoretical reasons for expecting Group and Group:Time to vary by participant. You seem to indicate that this is the case.

However I would be very wary of fitting too many random slopes. This is where the advice to "Keep it Maximal" is fatally flawed - very often the data simply doesn't support such a complex random structure, and even if it did, such a random structure might be overfitted, resulting in a model that fits this particular dataset well, but does not generalise to other similar datasets.

Related Question