# Treating stimuli and participants as crossed or nested random effects in lme4?

I have conducted an experiment where I measured the pupil diameter of 100 participants in response to 9 sounds presented in a random order, all participants heard the same 9 sounds. I would like to run a mixed effects linear model where I predict pupil size from different ratings (e.g. pupil_size ~ rating1 + rating2 + rating3). However, I would also like to account for each participant's natural pupil size as well as random fluctuations in the participant's pupil sizes due to low level properties of the sound (e.g. loudness, length, etc.).

I have been assuming that in this case stimuli (sound) and participant should be treated as crossed ((1|stimuli) + (1|participant)) but I wonder whether since pupil size variation in response to the stimuli will depend on each participant's natural pupil size should it be treated as nested?

• ratings1/2/3 are questions about sounds such as different emotional ratings (e.g. how angry does this sound make you?) which are averages of 9 point likert scales (e.g. rating1 is anger - which would be an average of three questions - how angry on 9 point scale, how annoyed 9 point scale, endorsement of angry facial expression 9 point scale). – ks19 Apr 15 at 16:45
• The 9 sounds are someone reading different scenarios (e.g. someone stealing, corruption, murder etc.) and I suppose I could have used more but I was using a battery of previously used stimuli. I am not so much interested in the sounds themselves as the variation based on the reactions to the sounds - so, for example, are pupil diameters larger when someone gives a higher anger rating - does that make sense? – ks19 Apr 15 at 16:46
• OK. This is a textbook example of crossed random effects. What I think you might be thinking about, is to have a random effect of participant on ratings. This is possible and might be a good idea actually. This would be pupil_size ~ rating1 + rating2 + rating3 + (1|stimuli) + (rating1 + rating2 + rating3 | participant). – amoeba Apr 15 at 18:07
• Ok, great thank you for your help! – ks19 Apr 15 at 18:09