[R-sig-ME] Variance components in generalized mixed models
Marco Chiarandini
marco at imada.sdu.dk
Fri Nov 7 18:51:31 CET 2008
Dear list,
I have some problems with lmer of lme4.
Using the latest version 0.999375-27 I receive as
messages the following:
> lmer(quality~
1+(1|instance),data=OONR,family=Gamma())
Error in mer_finalize(ans) :
General form of glmer_linkinv not yet written
> lmer(quality~
1+(1|instance),data=OONR,family=Gamma(link="log"))
Error in if (any(sd < 0)) return("'sd' slot has
negative entries") :
missing value where TRUE/FALSE needed
Before I was using the version 0.99875-9 and there
my problems were the following:
1) Fitting a generalized mixed model with random
effects having Gamma distribution, one obtains an
estmate for the variance of the random effects as
if it were a standard linear model (ie, with
errors normally distributed). What is the exact
meaning of this estimated variance? In other
terms, to which parameter of the Gamma
distribution it corresponds? (see examples below
for code and results)
2) In lmer the approximation method "PQL" is said
to be the default. Nevertheless running the
examples that follows one obtains very different
results. Why is this happening?
> lmer(quality~
1+(1|instance),data=OONR,family=Gamma(link="log"),method="PQL")
Generalized linear mixed model fit using PQL
Formula: quality ~ 1 + (1 | instance)
Data: OONR
Family: Gamma(log link)
AIC BIC logLik deviance
72 74.8 -34 68
Random effects:
Groups Name Variance Std.Dev.
instance (Intercept) 4.45e-01 0.66708
Residual 2.68e-05 0.00518
number of obs: 30, groups: instance, 6
Fixed effects:
Estimate Std. Error t value
(Intercept) 2.111 0.272 7.75
> lmer(quality~
1+(1|instance),data=OONR,family=Gamma(link="log"))
Generalized linear mixed model fit using Laplace
Formula: quality ~ 1 + (1 | instance)
Data: OONR
Family: Gamma(log link)
AIC BIC logLik deviance
14.7 17.5 -5.33 10.7
Random effects:
Groups Name Variance Std.Dev.
instance (Intercept) 0.0415 0.204
Residual 0.2005 0.448
number of obs: 30, groups: instance, 6
Fixed effects:
Estimate Std. Error t value
(Intercept) 2.166 0.117 18.6
>
> sessionInfo()
R version 2.7.0 (2008-04-22)
i486-pc-linux-gnu
locale:
C
The data OONR are available at:
http://www.imada.sdu.dk/~marco/Mixed/OONR.Rdata
Thank you in advance for any help you may provide.
Best regards,
Marco
--
Marco Chiarandini
Department of Mathematics and Computer Science,
University of Southern Denmark
Campusvej 55, DK-5230 Odense M, Denmark
marco at imada.sdu.dk, http://www.imada.sdu.dk/~marco
Phone: +45 6550 4031, Fax: +45 6550 2325
More information about the R-sig-mixed-models
mailing list