I am trying to apply a linear mixed model on my data. Unfortunately all howto's and papers I found yet do not help me with my design:
I have 30 different texts (stimuli) which are rated on 5 items (on the text quality) by the participants. Every participant rates 6 texts. Text 1 and 2 are rated by ALL participants. The other 28 texts are divided into 7 groups (4 each). The participants are randomly assigned to one of these text-groups (including Text 1 and Text 2 and 4 specific others 1,2,3,4,5,6; 1,2,7,8,9,10 and so on).
I already have the "ideal" ratings as a property of each text for all 30 texts. Now I want to see, if the participants are able to rate them similarly or not.
I therefore want to apply different linear mixed models as follows but I am not sure, if I am allowed to. The participants are, I guess, nested in the texts, but all participants are rating text 1 and 2 so there is no clear cluster. I want to account for text-effects and person effects.
So far, my code for the different models (I want to try all of them and test with an anova which one fits best) is:
#Texts as a random effect
model1 <- lmer(participant_rating ~ perfect_rating + (1|text), data = data)
#plus persons as a random effect
model2 <- lmer(participant_rating ~ perfect_rating + (1|text) + (1|participant), data = data)
#plus slopes
model3 <- lmer(participant_rating ~ perfect_rating + (1 + perfect_rating|text) + (1 + perfect_rating|participant), data = data)
I read in forums that the lme4 package actually has no problem with a lot of different variations in nesting and random effects but I'm afraid I will have to explain why I am allowed to do this.
I am really thankful for any advice :-)
...and I am sorry for the long post..
Edit:
I didn’t know a factor can be nested and not nested (because of texts 1 and 2). And thank you for drawing it. In my head though, it makes more sense that participants (n=300) are nested in the 28 texts. So the 28 texts are the grouping factor? And are models 2 and 3 really still appropriate, I thought I have to specify nested effects: in your example:
#plus persons as a random effect model2 <- lmer(participant_rating ~ perfect_rating + (1|participant/text) + (1|participant), data = data) #plus slopes model3 <- lmer(participant_rating ~ perfect_rating + (1 + perfect_rating|participant/text) + (1 + perfect_rating|participant), data = data)
And in my example:
#plus persons as a random effect model2 <- lmer(participant_rating ~ perfect_rating + (1|text) + (1|text/participant), data = data) #plus slopes model3 <- lmer(participant_rating ~ perfect_rating + (1 + perfect_rating|text) + (1 + perfect_rating|text/participant), data = data)
Thanks for a last advice and I guess then I will be good :-)