[R] help with glmm.admb

Ben Bolker bbolker at gmail.com
Mon Sep 5 17:21:59 CEST 2011


Elizabeth C Eadie <eeadie <at> unm.edu> writes:

> 
> 
> R glmmADMB question
> I am trying to use glmm.admb (the latest alpha version 
> from the R forge website 0.6.4) to model  my count data 
> that is overdispersed using a negative binomial family but 
> keep getting the following error message:
> 
> Error in glmm.admb(data$total_bites_rounded ~ 
> age_class_back, random = ~food.dif.id,  :
>    Argument "group" must be a character string specifying 
> the name of the grouping variable (also when "random" is 
> missing) 	

  This is an error message from the old version of glmmADMB,
so you must somehow (?) have failed to install / start the
right version of glmmADMB.  What is the result of
sessionInfo()?

> 
> Here is what I have tried so far (along with some similar 
> variations):
> model_nb<-glmm.admb(data$total_bites_rounded~age_class_back+
> (1|"subject")+
> (1|food.dif.id)+offset(log(forage_time)),
> data=data,family="nbinom")
> 

  The primary function of glmmADMB has been renamed "glmmadmb"
(more confirmation that you are still using the old version)

   Also, you shouldn't need the "data$" stuff there because
you have specified the 'data' argument.  I would say:

glmmadmb(total_bites_rounded~age_class_back+(1|focal_individual)+
  (1|food.dif.id)+offset(log(forage_time)),
  data=data,family="nbinom")

should work.

> 
> I am not sure what I am doing wrong. My model in lmer that 
> seemed to work was:

> modelc<lmer(data$total_bites_rounded~age_class_back+
>   (1|data$focal_individual)+(1|food.dif.id)+
>   offset(log(forage_time)),family=poisson)
> 
> Where age class is my one fixed variable and focal 
> individual (=subject) and food id are my two random 
> variables. I have tried a number of different things in 
> glmm.admb like making subject a group and food id the 
> random variable, and trying to write the commands in the 
> lme format instead of the lmer format, but always get the 
> same message. The message is confusing because I think 
> that I do have a random variable as well as a group 
> argument that is a character string. If anyone can see 
> what I am doing wrong or has any suggestions I would 
> really appreciate your thoughts.
>



More information about the R-help mailing list