0

I have been reading up on Linear Mixed Models with random slopes, and I have a question that I could not find addressed anywhere. I have seen a lot of R model formulae (example) where random slopes interact with fixed effects, but what is the analytical form of the regression equation when a mixed model has a random effect that interacts with a fixed effect?

Assume we have a model of experiment data such that Y ~ X1 + X2 + X1:X2 + (1+X1|participants), where there is a random slope for X1 as well as a random intercept to allow for individual difference between participants.

From this link, it is clear that the regression model for fixed interaction effects would have the following equation:

$$ \hat{Y} = \beta_{0} + \beta_{1}X_{1} + \beta_{2}X_{2} + \beta_{3}X_{1}X_{2} + \epsilon $$

And from this link, it is clear that the mixed model without the interaction effects, would have the following equation:

$$ \hat{Y} = (\beta_{0} + u_{0}) + (\beta_{1} + u_{1})X_{1} + \beta_{2}X_{2} + \epsilon $$

where $u_{0}$ and $u_{1}$ are the jointly normally distributed random variations.

How are these two equations combined in the aforementioned case, where X1 is a random effect and there is an interaction between that and the fixed effect X2? Would $\beta_{3}$ change as a result, such that $\beta_{3}$ also varies between participants? Is the following equation right, or is something missing?

$$ \hat{Y} = (\beta_{0} + u_{0}) + (\beta_{1} + u_{1})X_{1} + \beta_{2}X_{2} + \beta_{3}X_{1}X_{2} + \epsilon $$

The concrete example is that I'm trying to model data of temporal increase in measure Y over the course of the experiment, where X1 is the time variable and X2 is the categorical condition variable (0 or 1). I need the interaction variable because I am trying to test the significance of the difference in temporal increase in Y between the two conditions, and I want to allow for the possibility that this temporal increase (slope of X1) differs between participants. The study is between participants, so for a given participant, X2 is either always 0 or always 1.

I hope the question makes sense. Thanks in advance! :)

0 Answers0