[R-sig-ME] Error "mu[i] must be positive" with Gamma family
Stefan Frank
S.L.Frank at uva.nl
Tue May 18 12:20:00 CEST 2010
Hi,
I'm trying to fit a LMER to Gamma distributed data using the identity
link function, but keep running into the problem that a negative mean is
estimated:
> lmer(y~x+(1|s), data, family=Gamma(link="identity"), verbose=TRUE)
0: 303489.72: 0.0118042 5.95694 -0.0360192
1: 206240.18: 0.990220 6.16357 -0.0381219
Error in mer_finalize(ans) :
mu[i] must be positive: mu = 2.63294e-309, i = 1788870688
Fitting a GLM works fine. I tried taking its coefficients as start
values for the LMER, but that made no difference:
> m <- glm(y~x, data, family=Gamma(link="identity"))
> lmer(y~x+(1|s), data, family=Gamma(link="identity"),
start=coefficients(m), verbose=TRUE)
0: 303489.72: 0.0118042 5.95694 -0.0360192
1: 206240.18: 0.990220 6.16357 -0.0381219
Error in mer_finalize(ans) :
mu[i] must be positive: mu = 2.63293e-309, i = 1778647072
What could be going on, and what can I do about it?
R version 2.9.2 (2009-08-24) on Windows
lme4 version 0.999375-32
Best,
Stefan Frank
Institute for Logic, Language and Computation
University of Amsterdam
URL: staff.science.uva.nl/~sfrank
Tel: +31 20 5256054
Visiting address: Postal address:
Science Park 904, Room C3.123 P.O. Box 94242
Amsterdam 1090 GE Amsterdam
The Netherlands The Netherlands
More information about the R-sig-mixed-models
mailing list