Hi I am running an lmer which works fine with family=poisson mixed.model<-lmer(nobees~spray+dist+flwabund+flwdiv+round+(1|field),family="poisson",method="ML",na.action=na.omit) But it is overdispersed. I tried using family=quasipoisson but get no P values. This didnt worry me too much as i think my data is closer to negative binomial but i cant find any examples of negative binomial lmer. I tried using the family=negative.binomial(theta=x,link=log) but got an error message from R saying the function famiily=negative.binomial wasnt recognised. Can anyone suggest how to go about setting up the lmer with negative binomial distribution? Thanks -- View this message in context: http://www.nabble.com/negative-binomial-lmer-tf4797629.html#a13725388 Sent from the R help mailing list archive at Nabble.com.
If lmer() does not do it, you can try: http://otter-rsch.com/admbre/examples/glmmadmb/glmmADMB.html It handles negative binomial responce (but you may have to remove data entries involving NA manually). Regards, hans>Hi >I am running an lmer which works fine with family=poisson > >mixed.model<-lmer(nobees~spray+dist+flwabund+flwdiv+round+(1|field),family="poisson",method="ML", na.action=na.omit)> >But it is overdispersed. I tried using family=quasipoisson but get no P >values. This didnt worry me too much as i think my data is closer to >negative binomial but i cant find any examples of negative binomial lmer. I >tried using the family=negative.binomial(theta=x,link=log) but got an error >message from R saying the function famiily=negative.binomial wasnt >recognised. > >Can anyone suggest how to go about setting up the lmer with negative >binomial distribution? > >Thanks[[alternative HTML version deleted]]
lmer will work with negative binomial models, provided you specify an explicit, scalar value for theta. Rather than family = negative.binomial(theta = x) try something like family=negative.binomial(theta = 2.5) (or whatever you wish specify as theta). Bill Venables. -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of H. Skaug Sent: Thursday, 15 November 2007 8:16 PM To: r-help at r-project.org Subject: [R] negative binomial lmer If lmer() does not do it, you can try: http://otter-rsch.com/admbre/examples/glmmadmb/glmmADMB.html It handles negative binomial responce (but you may have to remove data entries involving NA manually). Regards, hans>Hi >I am running an lmer which works fine with family=poisson > >mixed.model<-lmer(nobees~spray+dist+flwabund+flwdiv+round+(1|field),family="poisson ",method="ML", na.action=na.omit)> >But it is overdispersed. I tried using family=quasipoisson but get no P >values. This didnt worry me too much as i think my data is closer to >negative binomial but i cant find any examples of negative binomiallmer. I>tried using the family=negative.binomial(theta=x,link=log) but got anerror>message from R saying the function famiily=negative.binomial wasnt >recognised. > >Can anyone suggest how to go about setting up the lmer with negative >binomial distribution? > >Thanks[[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.