I am having some issues in defining a syntax for a repeated measure log regression using the lmer() function from the lme4 package. I have 62 participants, each participant sees 120 trials, so the same trial is seen by all 62, but the order of the trial is random (so, trial number 45 is not the same for participant 1 and 2). In each trial, participants have to report either 1 (yes) or 0 (no). I am interested in the effect of trial as well as subject since I know that most participants (not everyone) tend to say more Yes more often as the number of trials increases (i.e., towards the end of the experiment). I was first recommended to model like this:
model<-glmer(DV~X+Y+Z+Y:Z + (1|Subject), data=data)
But this, to my knowledge, only captures the random effect of Subject. How do I control for Trial? Should I define an interaction effect between Subject and Trial?