I want to get marginal estimate and its confidence interval for a binomial model with two random intercepts, but I don't know how to specify the random argument of "mixed_model" function of "GLMMadaptive". This is how I use it for a model with one random intercept:
m3 <- mixed_model(fixed = cbind(resp,N-resp)~1,random=~1|Subject, data = df,
family = binomial(link = "probit"))
M_adp <- marginal_coefs(m3,std_errors = TRUE, cores = 5)
pnorm(confint(M_adp))
How should I code it if I want to add another random intercept term?
I tried different notations (e.g., random = list(subjid = ~ 1, condition = ~1)
) but it's not working.