<div>Hi,</div>
<div> </div>
<div>I am struggling to understand the syntax for fitting a negative binomial multilevel model using glmm.admb. I have conducted a cluster-randomized trial with longitudinal data where students are nested in classes and observations over time are nested within students. My outcomes have a negative binomial distribution.</div>
<div> </div>
<div>I would like to fit a model where I model Y = Treat with nested random effects for classes and students.</div>
<div> </div>
<div>my question:</div>
<div> </div>
<div>1) in the random statement how do I specific multiple nested random effects? Is is random= ~class: student </div>
<div> </div>
<div>2) I don't understand the "group" argument. The documentation say that this is a string naming the main nesting variable. Would that be students or classes in my case? When it says it must be a factor what does that mean?</div>
<div> </div>
<div>My general thought is to specify the model as</div>
<div> </div>
<div>output <- glmm.admb(Y~Treat, random=~class: student , group="???",family="nbinom", data=mydata)</div>
<div> </div>
<div>Any specific help you can provide about coding would be greatly appreciated.<br></div>
<div>Best,</div>
<div> </div>
<div>Matt</div>
<div> </div>
<div>--</div>
<div>Matthew Kraft<br>Doctoral Candidate in Quantitative Policy Analysis<br>Harvard Graduate School of Education<br></div><br>