[R] Generalized nonlinear mixed model function?

Phillip J van Mantgem pvanmantgem at usgs.gov
Wed Feb 13 20:18:59 CET 2008


(Sorry for the re-posting. My first attempt failed.)

I am wondering if there is an R function that could estimate a generalized
nonlinear mixed model.

From my reading it seems that nlme from the nlme package can fit nonlinear
mixed models, while lmer from the lme4 package can fit generalized linear
mixed models.

One alternative I’ve found is gnlmix from the repeated package, although
this only allows for a single random effect.

Is there anything else out there that I have missed?

Thanks,
Phil

Phillip van Mantgem
USGS Western Ecological Research Center
Sequoia and Kings Canyon Field Station
47050 Generals Highway #4
Three Rivers, CA  93271-9651     USA
-----------------------------------------------------------

The motivating problem is estimating average trends in forest mortality
rates with unequally spaced census intervals. The census interval has an
exponential effect on survival (i.e., p = annual survival, year.interval =
census interval, and p^year.interval; annual morality = 1 - p), leading me
to use a nonlinear model. Our data are composed of counts of live and dead
trees, so I’ll need to use a binomial or poisson model.

Our data look like the following...

# plot identifier (random effect)
# eventually I’ll need to add another random term for species identity
plot <- rep(c("A", "B", "C"), each = 3)

# census identifier
census <- rep(1:3, 3)

# year of census
year <- c(1960, 1989, 2004, 1960, 1989, 2004, 1955, 1989, 2004)

# interval between census years
year.interval <- c(NA, 29, 15, NA, 29, 15, NA, 34, 15)

# count of live trees
n.live <- c(1509, 1249, 1106, 1986, 1616, 1383, 3529, 2831, 2511)

# count of dead trees
n.dead <- c(NA, 260, 143, NA, 370, 233, NA, 698, 320)

forest.mort <- data.frame(plot, census, year, year.interval, n.live,
n.dead)


More information about the R-help mailing list