I have a dataset with 1206 deputies from two different chambers (1998 and 2002, respectively). In addition, there are 18 parties, and some deputies are in both chambers (the ones who were reelected). I am interested in the relation between party discipline (in a scale from 0 to 100) and the probability of geting appointed as party leader (0 or 1), but I am also interested in separate estimates for each party.
A classmate told me that the following mixed effect model would be appropriate, but I don't know what to do with the correlation within subjects:
model <- glmer(leader ~ discipline + (1 + discipline|chamber:party), data, family=binomial)What is the structure of these data and which model would be appropriate in this case (using R)?


雷达卡



京公网安备 11010802022788号







