[R-sig-ME] lme4 observation level effects with indicator

Tiffany Vidal tiffany.vidal at gmail.com
Sat Apr 2 21:23:26 CEST 2016


I am interested in estimating a mixed model with a random effect for year,
site, and an observation-level effect to account for overdispersion,
assuming Poisson error structure, using the lme4 package in R.
Additionally, I have an indicator variable 'period' to adjust the parameter
estimated by pre- and post- time periods. I am running into problems trying
to specify the observation level effect by time period. I could model this
using glmer.nb and avoid the observation-level effect, but I would like the
flexibility to allow overdispersion to vary by time period as well. If
there was a way to allow the negative binomial scaling parameter to vary by
time period, I would probably use glmer.nb.

My model as I'm trying to specify with glmer:
mod.pois <- glmer( count ~ 1 + period + year  + year*period +
(period|year.factor) + (period|Site) ,
                        data=dat, family=poisson)

The above runs and I think does what I want, but doesn't include the
observation-level effect.

I have tried:
mod.pois <- glmer( count ~ 1 + period + year  + year*period +
(period|year.factor) + (period|Site)  + (period|Site:year.factor),
                        data=dat, family=poisson)

but the error indicates identifiability issues. I have one observation at
each site x year combination.

Is there a way to achieve this using this package? Thank you in advance for
any thoughts.

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list