[R-sig-ME] glmer.nb(): Residual term ??
Daniel Fulop
dfulop.ucd at gmail.com
Tue Apr 28 17:21:44 CEST 2015
Hi Christine,
Others more knowledgeable than I may chime in, but as far as I know the
GLMM parameterization that lme4 uses doesn't have a residual error
term. Other R software does have residuals, such as MCMCglmm.
HTH,
Dan.
Christine Adrion wrote:
> Hello,
>
> I fit a negative binomial GLMM using the lme4 package (version
> lme4_1.1-7), R-function glmer.nb(). It seems that this is still an
> experimental feature. The help function does not explain the residual term
> in the resulting R output.
>
> #---------------
> # Reproducible example:
> tmpf<- function() {
> x<- runif(400) - 0.5
> z<- gl(n=40, k=10)
> m<- model.matrix(~x + z)
> u<- rnorm(40, sd=0.5)
> eta<- m %*% c(0, 3, u[-1] - u[1])
> y<- rnbinom(n=length(eta), size=3, mu=exp(eta))
> data.frame(y, x, z)
> }
>
> set.seed(2011)
> simdf<- tmpf()
> m<- glmer.nb(y ~ x + (1|z), data=simdf)
> m
>
> ##------------ output --------------------
> Generalized linear mixed model fit by maximum likelihood (Laplace
> Approximation) ['glmerMod']
> Family: Negative Binomial(6.7839) ( log )
> Formula: y ~ x + (1 | z)
> Data: ..2
> AIC BIC logLik deviance df.resid
> 890.5451 906.5109 -441.2725 882.5451 396
> Random effects:
> Groups Name Std.Dev.
> z (Intercept) 0.3923
> Residual 0.9665
> Number of obs: 400, groups: z, 40
> Fixed Effects:
> (Intercept) x
> -0.5511 2.5969
> #-----------------------------------------
>
> Unfortunately, it's not clear to me what the measure "Residual" exactly
> expresses and thus why it is used by glmer.nb.
>
>
> [BTW, the fitted dispersion parameter 'size' is not very close to the true
> one (which was 3).]
>
> Thanks for any help/explanation.
>
> Kind regards
> Christine
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
--
Daniel Fulop, Ph.D.
Postdoctoral Scholar
Dept. Plant Biology, UC Davis
Maloof Lab, Rm. 2220
Life Sciences Addition, One Shields Ave.
Davis, CA 95616
More information about the R-sig-mixed-models
mailing list