I have disaggregated/long-format data representing a binary outcome (success/failure). Cases are described by a single covariate called "covariate1". In each case, there are multiple participants, so each row represents an individual's response in that particular case (a trial). I'm interested in the effect that case characteristics have on the probability of observing successes.
I want to model this as mixed logistic regression with a binomial response because participants can appear in more than one case, so trials across cases can be clustered by their ID. The code for my models is shown below:
#If data were aggregated, information about the dependency across trials would be lost:
library(lme4)
glmer(cbind(resp,trials) ~ cov1
family=binomial, agg.data)
#Disaggregated data
glmer(resp ~ cov1 + (1|ID),
family=binomial, disagg.data)
Is it correct to specify a random intercept for participant ID across trials? What would be the interpretation of the random intercept estimates?