[R] negative binomial lmer

Gregor Gorjanc gregor.gorjanc at bfro.uni-lj.si
Fri Jul 28 22:19:48 CEST 2006


Ben Bolker <bolker <at> ufl.edu> 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:
> 
> www.cefe.cnrs.fr/esp/TBElston_Parasitology2001.pdf

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



More information about the R-help mailing list