[R] glmer.nb: function not in downloaded lme4 package?

240 views
Skip to first unread message

Ross Marriott

unread,
May 18, 2013, 2:23:34 AM5/18/13
to R-h...@r-project.org
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]]

Ben Bolker

unread,
May 18, 2013, 8:41:57 AM5/18/13
to r-h...@stat.math.ethz.ch
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 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:
>

This question would probably be better on the
r-sig-mix...@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

______________________________________________
R-h...@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.

Niklas Fischer

unread,
May 19, 2013, 6:42:33 AM5/19/13
to Ben Bolker, r-h...@stat.math.ethz.ch
Thanks in advance!


2013/5/18 Ben Bolker <bbo...@gmail.com>
[[alternative HTML version deleted]]
Reply all
Reply to author
Forward
0 new messages