[ADMB Users] glmmadmb in R

Ben Bolker bbolker at gmail.com
Thu Nov 10 13:46:41 PST 2011


On 11-11-10 04:42 PM, Mollie Brooks wrote:
> Hi Chris, 
> I get the same error as you when I run 
> fit = glmmadmb(y~Base*trt+Age+Visit,random=~Visit,group="subject",data=epil2,family="nbinom")
> but this works
> fit = glmmadmb(y~Base*trt+Age+Visit+(Visit|subject),data=epil2,family="nbinom")
> 
> So I guess you have the newer version of glmmADMB (like me) and I guess it requires this syntax.

 glmmadmb(y~Base*trt+Age+Visit,
   random=~Visit|subject,data=epil2,family="nbinom")

 should also work.

> cheers,
> Mollie
> 
> Mollie Brooks
> Ph.D. Candidate
> NSF IGERT Fellow
> Biology Department
> University of Florida
> mbrooks at ufl.edu
> http://people.biology.ufl.edu/mbrooks
> 
> 
> 
> 
> On 10 Nov 2011, at 4:01 PM, Christopher Smith wrote:
> 
>> Hello,
>>
>> I am fairly new to R but am attempting to use GLMMs with neg. bin. distribution to analyze count data. (I have successful done this using glmer() and glm.nb() ). I am having trouble getting the function glmmabmb() to work, even for the example provided at: http://admb-project.org/examples/r-stuff/glmmadmb
>>
>> I am getting the error, 
>>
>>> fit = glmmadmb(y~Base*trt+Age+Visit,random=~Visit,group="subject",data=epil2,family="nbinom")
>> Error in glmmadmb(y ~ Base * trt + Age + Visit, random = ~Visit, group = "subject",  : 
>>   unused argument(s) (group = "subject")
>>
>>
>> And/or
>>
>>> fit = glmmadmb(y~Base*trt+Age+Visit,random=~Visit,data=epil2,family="nbinom")
>> Error in `colnames<-`(`*tmp*`, value = character(0)) : 
>>   attempt to set colnames on object with less than two dimensions
>>
>> The second error is the same error I get when trying to use the function with my data. 
>>
>> E.g., 
>>
>>> glmmadmb(ANAM~tmin+CWD,family="nbinom",random=~Day)
>> Error in `colnames<-`(`*tmp*`, value = character(0)) : 
>>   attempt to set colnames on object with less than two dimensions
>>
>>
>> I am on a Mac (OS X 10.5.8) running R (2.12- 32bit). Any advice? 
>>
>> Thanks,
>> Chris
>> _______________________________________________
>> Users mailing list
>> Users at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/users
> 
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users




More information about the Users mailing list