The `glmmADMB`

package, built on the open-source AD Model Builder
platform, is an R package for fitting generalized linear mixed models (GLMMs).

Its capabilities include:

- a wide range of families (response distributions), including non-exponential families such as negative binomial (type 1 and 2), Beta, logistic, and truncated Poisson and negative binomial distributions as well as the standard exponential families (binomial, Poisson, Gamma, Gaussian).
- a wide range of link functions: log, logit, probit, complementary log-log, identity, inverse.
- Zero-inflation (currently only as a single constant term across all groups)
- Single or multiple random effects, including both nested and crossed effects
- Markov chain Monte Carlo (MCMC) summaries of uncertainty

In order to use glmmADMB effectively you should already be reasonably familiar with GLMMs, which in turn requires familiarity with (i) generalized linear models (e.g. the special cases of logistic, binomial, and Poisson regression) and (ii) 'modern' mixed models (those working via maximization of the marginal likelihood rather than by manipulating sums of squares).

Please visit the following webpages for more information about the `glmmADMB` package (*please note the
latter is somewhat out of date, although it may still contain useful information*):

- R-Forge (current development)
- ADMB Project (recent homepage)

- First try

`install.packages("glmmADMB", repos="http://r-forge.r-project.org", type="source")`

- If this fails (because you don't have the very latest version of R, or because R-forge is having a bad day),
try

`install.packages("glmmADMB", repos=c("http://glmmadmb.r-forge.r-project.org/repos", getOption("repos")),type="source")`

... with or without the`type="source".`

`Arni Magnusson has uploaded glmmADMB 0.8.0 (24 May 2014) for Linux and Windows (R 3.x) to a local repository:`

`install.packages("glmmADMB", repos=c("http://www.hafro.is/~arnima/repos", getOption("repos")))`

`If all else fails, contact the package maintainers.`

`Note that recent versions of`

`glmmADMB`

(>=0.7) require the`R2admb`

package as well; under normal circumstances this should be installed automatically when you install`glmmADMB`

, but if you run into trouble you should try solutions similar to those listed above.`At present the binaries included in the`

`glmmADMB`

will**not**run on MacOS 10.5 (Leopard) or earlier. If you encounter this problem, your choices are:- Upgrade your system to a more recent version of MacOS (if possible).
- Build
`glmmadmb`

from its TPL file on your machine. This will be a bit tricky if you are not reasonably experienced.- Download the full AD Model Builder source code from the AD
Model Builder download page and follow the
directions for building AD Model Builder from
source; you may need to install Xcode, and you may need to ask for help at
`users@admb-project.org`

. (Googling "admb macos 10.5" will be helpful as well, although it's possible that you will need the most recent version of the ADMB source code to compile`glmmadmb.tpl`

properly ...) - find the
`glmmadmb.tpl`

file in the`glmmADMB`

package directories and use ADMB to compile it to a binary - copy the resulting binary to the
`bin/macos32`

or`bin/macos64`

directory as appropriate.

- Download the full AD Model Builder source code from the AD
Model Builder download page and follow the
directions for building AD Model Builder from
source; you may need to install Xcode, and you may need to ask for help at
- Contact the maintainers to appeal for help and find out if there any new developments in support for MacOS versions less than 10.6.
- A similar process may work for other unsupported operating systems such as Solaris, but in that case it's also probably a good idea to contact the maintainers.

```
```## Additional documentation

- Current (fairly minimal) documentation/example for ADMB in HTML and
PDF format. This is also accessible from within R (once
`glmmADMB`

is
installed) via `vignette("glmmADMB",package="glmmADMB")`

.
- The GLMM FAQ page gives general advice about GLMMs, although its content
is slightly more oriented toward the
`lme4`

package.
- We recommend the R mixed models list at
`r-sig-mixed-models@r-project.org`

for `glmmADMB`

questions, although if you feel that your question is more AD Model Builder-oriented than R-oriented you may also
want to try the AD Model Builder user's list.

## Newer versions

Newer versions of `glmmADMB` (>0.6.4) have the following major changes:

- new formula format, similar to that of the
`lme4` package, where random and fixed effects are specified as
part of a single formula (`random` can also be specified separately, as in `lme`).
- multiple grouping variables (random effects) are allowed.
- wider range of distributions and link functions supported (e.g. binomial with
*N*> 1).

The new release is somewhat slower (for the time being) than older (pre-0.5.2) versions: if you have a desperate need
for a copy of an old version, you can
download a source version and
follow alternative #3 from the installation instructions above.