Re: [R] negative binomial lmer

From: Gregor Gorjanc <>
Date: Sat 29 Jul 2006 - 06:19:48 EST

Ben Bolker <bolker <at>> writes:

> I haven't tried it, but you could also consider using
> a Poisson-lognormal (rather than neg binomial, which is Poisson-gamma)
> distribution, which might make this all work rather well
> in lmer:

Actually it is very simple

lmer(y ~ effA + (1 | effB), family=quasipoisson)

i.e. this fits the following model

y_ijk ~ Poisson(\lambda_ijk)
log(lambda_ijk) = \mu + effaA_i + effB_ij + e_ijk effB_i ~ Normal(0, \sigma^2_b)
e_ijk ~ Normal(0, \sigma^2_e)

Gregor mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sat Jul 29 06:39:52 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 30 Jul 2006 - 06:16:52 EST.

Mailing list information is available at Please read the posting guide before posting to the list.