[R-sig-ME] Lmer output for negative binomial data
Ben Bolker
bolker at ufl.edu
Mon Dec 10 13:18:40 CET 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I believe it's basically telling you that there's no
additional variation to assign to the within-subject level,
so it's setting the within-subject sd very very small (2 x 10^{-5}).
In a way this is not surprising, since the theta you've estimated
from glm.nb has already accounted for any additional variation
in the data above the sampling (Poisson) variation.
The statistical model is (I think!)
y ~ neg binom(mu, theta)
mu_{ij} ~ exp(0.5306 + eps_i + eps_ij)
where eps_i (subject effect) ~ Normal(0,3.6e-10)
eps_ij (error term) ~ Normal(0,0.715)
although actually I'm not sure whether the eps_ij
applies to mu or to y ...
Ben Bolker
Sandrine-et-Francois wrote:
> Dear R-list,
> May I ask for help in interpretating the output of 'lmer' (from the lme4
> package) when dealing with negative binomial data ?
>
> I'm using the functions glm.nb (from the MASS package) and lmer (from the
> lme4) to fit respectively fixed-effects and mixed-effects generalized linear
> models to data, generated from a negative binomial distribution : count ~
> Neg.Bin (mu, theta). Here is the code:
> ==============================================================================
> #Generate the data frame
> set.seed(2153)
> mydf<-data.frame(subjs=seq(1:nsubjids),
> counts=rnbinom(nsubjids*ntimes, size=0.5, mu=1.8))
>
> #Model
> require(MASS); require(lme4)
> summary(glm.nb(counts~1, data=mydf))
> summary(lmer(counts~1+(1|subjs),
> family=negative.binomial(theta=fixed.nb0$theta), data=mydf))
> ==============================================================================
> The glm.nb output gives : mu=exp(0.5306) and theta=0.513.
> I use the theta estimate from glm.nb as input into lmer, and I obtain,
> mu=exp(0.5306).
>
> The output from lmer gives the following for the Random effects:
> Random effects:
> Groups Name Variance Std.Dev.
> subjs (Intercept) 3.5577e-10 1.8862e-05
> Residual 7.1155e-01 8.4353e-01
> number of obs: 30, groups: subjs, 10
>
> I interprete the "subjs" component as an individual error term "e" (so, that
> mu=exp(0.5306)*exp(e)) with e~N(0, 3.5577e-10) ? Is this correct ?
> What about the 'Residual' term ?
>
> Thanks for your help,
> Best regards,
> François
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHXS6gc5UpGjwzenMRAtXdAJ9Zvb1YYH9Ohwrx25h9i+dn16eIRgCbBRSe
pS0ZZovk1rrks/UVCK2jLC4=
=TSEd
-----END PGP SIGNATURE-----
More information about the R-sig-mixed-models
mailing list