I ran a study with the following design: Subjects were presented 100 different stimuli and asked to indicate their liking (scaled from 0-10) for each stimulus. Each stimulus was part of only one of 4 different groups, thus it was a nested design (repeated measures for the different stimulus groups; within-subjects). Now I would like to conduct a linear mixed model analysis using the lmer
function of the lme4
package in R, but as a newbie I am very insecure about my approach. I want to consider both random intercepts for stimuli and subjects and also allow random slopes for subjects.
I thought of the following model:
model = lmer(liking ~ group + (1|group/stimulus) + (1+group|subject), data=mydata)
Does this model make any sense?