I am interested in whether it is ever logical to specify a random slope of a variable that is not listed as a fixed effect in the model. For clarity, I have provided an example below.
10 Participants complete a reaction time (RT) task identifying whether a sentence makes sense or not. Sentences are from two conditions (Condition A and Condition B). There are 10 different sentences used, with each sentence appearing twice (once in each condition). All participants see the same sentences.
For clarity, here is a sample of this dataset:
Participant | Sentence | Condition | RT |
---|---|---|---|
1 | 1 | A | 0.01 |
1 | 1 | B | 0.05 |
1 | 2 | B | 0.07 |
1 | 2 | A | 0.10 |
2 | 9 | A | 0.05 |
2 | 9 | B | 0.08 |
The first mixed model examines the effect of Condition
and Sentence
, with a random effect of Participant
and by-Participant
slopes for Condition
, Sentence
, and the interaction between these variables.
model_1<-lmer(RT ~ Condition*Sentence+(Condition * Sentence|Participant))
The second mixed model uses only Condition
as a fixed effect, but the random effect structure remains the same. While in theory it would seem possible here to investigate how the effect of Sentence
varies across participants, I am unsure whether this is possible in a mixed model if Sentence
is not specified as a fixed effect.
model_2<-lmer(RT ~ Condition+(Condition * Sentence|Participant))
I realise that all models require selection of the most appropriate model based on the experimental question, theory, and model fitting. I also realise that there are other ways to include Sentence
as a random effect, such as with random intercepts for Sentence
.This question therefore does not relate to which is the better model and/or whether there are other ways to include Sentence
in the model, but asks whether it is ever possible (based on the mathematics/logic of the mixed model) to include a random effect for a variable that is not listed as a fixed effect.