Ross Marriott
2013-May-18 06:23 UTC
[R] glmer.nb: function not in downloaded lme4 package?
Dear R Help, I would like to use the glmer.nb function for mixed modelling using negative binomial distribution please. On the CRAN website apparently this function is called from the lme4 package (version 0.99999911-1). I have downloaded the latest version of the lme4 package (version 0.999999-2) and have recently reinstalled the latest version of 64-bit R (version 3.0.1) but after loading the package and calling: library(lme4) help(glmer.nb) # I receive the following message: No documentation for ‘glmer.nb’ in specified packages and libraries: you could try ‘??glmer.nb’ # I called the glmer() function successfully, i.e. glmer(CNos ~ Year+Month+(1|Vessel), data=Occ.cr, family=poisson, offset=Occ.cr$logtrapd) # but when I tried this: glmer.nb(CNos ~ Year+Month+(1|Vessel), data=Occ.cr, offset=Occ.cr$logtrapd) # I got the error message: Error: could not find function "glmer.nb" # Can you please provide advice on how I might use glmer.nb or alternative code on how I might perform this analysis? Thank you. Regards, Ross Marriott Ph.D. Senior Research Scientist Stock Assessment and Data Analysis Department of Fisheries WA Western Australian Fisheries and Marine Research Laboratories PO Box 20, North Beach WA 6920, Australia. Phone: +61 8 9203 0201 (office); 0434604131 (mobile) Fax: +61 8 9203 0199 Web: http://www.fish.wa.gov.au<https://mail.fish.wa.gov.au/owa/UrlBlockedError.aspx> [[alternative HTML version deleted]]
Ross Marriott <Ross.Marriott <at> fish.wa.gov.au> writes:> > Dear R Help, > > I would like to use the glmer.nb function for mixed modelling usingnegative binomial distribution please.> > On the CRAN website apparently this function is > called from the lme4 package (version 0.99999911-1). > > I have downloaded the latest version of the lme4 package > (version 0.999999-2) and have recently > reinstalled the latest version of 64-bit R (version 3.0.1) > but after loading the package and calling: >This question would probably be better on the r-sig-mixed-models at r-project.org list. glmer.nb() is _only_ in development versions of lme4, not in the stable version on CRAN, and furthermore it is still quite new and poorly tested. If you want to try it out you are probably best of installing from github via install_github in the devtools package. Alternatively you could try the glmmADMB package, on r-forge. Ben Bolker