Solved – Using the same variable as a fixed and random effect in Mixed Effect Models

lme4-nlmemixed modelr

The experiment this data comes from an experiment where two people collaborate to put objects in a specific order. The Director has the target array on their screen, and the Matcher has a scrambled array on their screen that must be reorganized to match the Director's display. The Director is a confederate using a script. After a few rounds using the same objects in different orders, there is a critical round.

The measure of interest is the reaction time (RT) of the Matcher to look at a target object on a screen based on whether the object was referred to using a previously established label (Old Label) or a novel label (New Label) and whether the interaction partner was the same partner as before (Same Partner) or a new partner (Different Partner). Each participant experienced 8 critical rounds, such that there are 2 observations in each cell of the design per participant, with each critical round using a different target object. Thus, we have a 2 (Label) x 2 (Partner) within-subjects design. We predicted that RT would be slowest when the Same Partner used a New Label, but RT would not differ in the other three groups (i.e., an interaction effect).

This effect was borne out using ANOVA. However, I want to use a mixed effect model to capture both participant and item level variation in the same model. My current model in R is an intercepts only random model:

rm1 <- lmer(RT ~ Label*Partner + (1|Subject) + (1|Item))

However, I would like to include random slopes in the model that acknowledge the fact that participants may have had idiosyncratic differences to each cell in the design and that the RT to each item may also display idiosyncratic differences. Thus, I imagine this model would look like:

rm2 <- lmer(RT~Label*Partner + (Label*Partner|Subject) + (Label*Partner|Item))

Yet, I'm not sure if it's appropriate to include an effect as both a fixed and random effect in my model. If I only include the Label and Partner variables as random effects then I am unable to extract coefficients from the model and thus I cannot determine significance.

Best Answer

Note that your model rm1 includes a factor that is used both a fixed and a random effect -- namely the intercept. So yes, it is OK to do what you propose. The only issue is that there are a whole lot more random effects to estimate. There is always a trade off between parsimony and fit, so look at the AIC and BIC statistics, among others, to make sure you're not getting too fancy. For example, you might consider at least not having the interactions in there as random effects.

Related Question