<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Raff,<div>If that's what you want, then you are miss specifying the model and changing the max nvar offset won't help. </div><div>In lme4 you would specify a random effect as (effect|group) in your case an intercept is an effect of 1 (constant) and you want nested grouping variables. For a quick reference see <a href="http://glmm.wikidot.com/faq">http://glmm.wikidot.com/faq</a> and scroll down to model specification.</div><div><br></div><div>The old version of glmm.admb (the one you're running) can't handle multiple grouping variables, but see <a href="http://glmmadmb.r-forge.r-project.org/">http://glmmadmb.r-forge.r-project.org/</a></div><div>You'll have to switch to the new version to get the model you want and an added bonus is that the syntax is more like lme4 which you're used to. </div><div><br></div><div>cheers,</div><div>Mollie</div><div><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 12px;"><span class="Apple-style-span" style="font-size: medium;"><br></span></span></font></div><div><div><div>On 12 Jun 2011, at 8:11 AM, Rafael Mares wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Mollie<br><br>Thanks for the quick reply. I'm trying to run an intercept only model<br>with individual identity (group="id") and group identity<br>(random=~group) as random effects. I have 230 individuals and 15<br>groups (14 - 200 individuals per group, and 1 - 60 measures per<br>individual). I usually use lme4, where I would have individuals nested<br>in groups (as individuals are unique to groups), but I am aware that<br>this isn't possible with glmmADMB (or at least not obvious), so I am<br>just trying to specify them as two separate random effects (two<br>sources of variation for the intercept)... hopefully this makes sense.<br>Maybe I'm not specifying this correctly in the model - I'm not yet too<br>familiar with the notation in glmm.admb<br><br>I can run the model with ' random=~1, group="id" ' with no problem,<br>but that leaves my group identities out of the picture. Any<br>suggestions?<br><br>Thanks again for your help and interest.<br><br>Raff<br><br>--<br>Rafael Mares<br>Large Animal Research Group (LARG)<br>Department of Zoology<br>University of Cambridge<br>Downing Street<br>Cambridge<br>CB2 3EJ<br><br><br><br>On 12 June 2011 12:23, Mollie Brooks <<a href="mailto:mbrooks@ufl.edu">mbrooks@ufl.edu</a>> wrote:<br><blockquote type="cite">Hi Rafael,<br></blockquote><blockquote type="cite">You might be miss-specifying your model.<br></blockquote><blockquote type="cite">You may want<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">mix<-glmm.admb(dur~1,random=~1,group="id",data=dat,family="nbinom",easyFlag=FALSE,verbose=TRUE)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This would make an intercept only model but allow the different levels<br></blockquote><blockquote type="cite">of "id" to vary in their intercept. Depending on your experimental design,<br></blockquote><blockquote type="cite">this might be what you want. What relationship were you hoping the model to<br></blockquote><blockquote type="cite">represent?<br></blockquote><blockquote type="cite">cheers,<br></blockquote><blockquote type="cite">Mollie<br></blockquote><blockquote type="cite">Mollie Brooks<br></blockquote><blockquote type="cite">Ph.D. Candidate<br></blockquote><blockquote type="cite">NSF IGERT Fellow<br></blockquote><blockquote type="cite">Biology Department<br></blockquote><blockquote type="cite">University of Florida<br></blockquote><blockquote type="cite"><a href="mailto:mbrooks@ufl.edu">mbrooks@ufl.edu</a><br></blockquote><blockquote type="cite"><a href="http://www.zoology.ufl.edu/mbrooks">www.zoology.ufl.edu/mbrooks</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 12 Jun 2011, at 7:04 AM, Rafael Mares wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Dear all<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I am trying to run the following model using glmmADMB (ver. 0.5-2) in<br></blockquote><blockquote type="cite">R (ver. 2.13.0) in a linux terminal:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">rmix<-glmm.admb(dur~1,random=~group,group="id",data=dat,family="nbinom",easyFlag=FALSE,verbose=TRUE)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">and I get the following error message:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Current maximum number of independent variables is 50000<br></blockquote><blockquote type="cite"> You need to increase the global variable MAX_NVAR_OFFSET to 58531<br></blockquote><blockquote type="cite"> This can be done by putting the line<br></blockquote><blockquote type="cite"> 'gradient_structure::set_MAX_NVAR_OFFSET(58531);'<br></blockquote><blockquote type="cite"> before the declaration of the gradient_structure object.<br></blockquote><blockquote type="cite">Error in glmm.admb(dur ~ 1, random = ~group, group = "id", data = dat, :<br></blockquote><blockquote type="cite"> The function maximizer failed<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I've done some reading, mainly on the admb-project website and posts<br></blockquote><blockquote type="cite">on this mailing list, and tried modifying the 'gradient_structure'<br></blockquote><blockquote type="cite">line in the TOP_OF_MAIN_SECTION in the nbmm.tpl file in my R library,<br></blockquote><blockquote type="cite">as I think is suggested... but I get the same error message as if<br></blockquote><blockquote type="cite">nothing had been changed. I would greatly appreciate it if someone<br></blockquote><blockquote type="cite">could clarify if I'm doing something wrong, or if it actually isn't<br></blockquote><blockquote type="cite">possible to change the gradient_structure when running glmmADMB<br></blockquote><blockquote type="cite">through R. By the way, I have no problems running the same model with<br></blockquote><blockquote type="cite">"random=~1".<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thank you in advance for any help.<br></blockquote><blockquote type="cite">All the best,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Raff<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite">Rafael Mares<br></blockquote><blockquote type="cite">Large Animal Research Group (LARG)<br></blockquote><blockquote type="cite">Department of Zoology<br></blockquote><blockquote type="cite">University of Cambridge<br></blockquote><blockquote type="cite">Downing Street<br></blockquote><blockquote type="cite">Cambridge<br></blockquote><blockquote type="cite">CB2 3EJ<br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">Users mailing list<br></blockquote><blockquote type="cite"><a href="mailto:Users@admb-project.org">Users@admb-project.org</a><br></blockquote><blockquote type="cite"><a href="http://lists.admb-project.org/mailman/listinfo/users">http://lists.admb-project.org/mailman/listinfo/users</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br></div></blockquote></div><br></div></body></html>