Skip to content

Bug?: var estimates on exp scale for gaussian(link=log)

6 messages · Gorjanc Gregor, Douglas Bates, Gregor Gorjanc

#
Hi!

I would like to fit log-normal fixed model with lmer. Fixed effects estimates
are returned on log scale, while variance components are returned on exp scale.
Why is this the case?

Here is my example. I fit several models to show the behaviour.

Thanks, Gregor
...
Random effects:
 Groups   Name        Variance Std.Dev.
 ci       (Intercept) 1.17     1.080
 di       (Intercept) 0.99     0.995
 Residual             1.09     1.042
number of obs: 1000, groups: ci, 100; di, 50

Fixed effects:
            Estimate Std. Error t value
(Intercept)  -1.3399     0.2354    -5.7
ai            4.0293     0.0706    57.1
...
...
Random effects:
 Groups   Name        Variance Std.Dev.
 ci       (Intercept) 1.33e+14 11531505
 di       (Intercept) 6.10e+13  7809115
 Residual             7.35e+15 85757196
number of obs: 1000, groups: ci, 100; di, 50

Fixed effects:
             Estimate Std. Error t value
(Intercept) -30997885   12065854   -2.57
ai           20613508    5480798    3.76
...
+             data=pod, family=gaussian(link="log"))
CHOLMOD warning: w"
??L_? ??<_? ??z
Error in devLaplace(PQLpars) :
  Cholmod error `matrix not positive definite' at
file:../Supernodal/t_cholmod_super_numeric.c, line 613

btw, why is this happening, there is no such problem with identity
link?
+             data=pod, family=gaussian(link="log"))
...
Random effects:
 Groups   Name        Variance Std.Dev.
 ci       (Intercept) 4.39e+13  6622360
 Residual             1.64e+14 12824146
number of obs: 1000, groups: ci, 100

Fixed effects:
             Estimate Std. Error  t value
(Intercept) -2.16e+00   2.83e+05 -7.6e-06
ai           4.91e+00   3.99e-01    12.33
...

Here fixed effect estimates are on log scale, while variance component
estimates are huge --> is this on exp scale?
#
Gorjanc Gregor <Gregor.Gorjanc at ...> writes:
I also tried with newest version from R-Forge (svn checkout), but I can not fit
the log-normal mixed model at all. Using the same code as in previous mail I get
+             data=pod,
+             family=gaussian(link="log"))
Error in mer_finalize(ans, verbose) : 
  General form of glmer_linkinv not yet written

Gregor
#
Gorjanc Gregor <Gregor.Gorjanc at ...> writes:
I would just like to add that I expected to get variance estimates on link (log)
scale as it is done for poisson (log link) or binomial (logit or probit link)
families.

Regards, Gregor
#
The development version of the lme4 package has some of the families
(binomial or quasibinomial with logit or probit link, poisson or
quasipoisson with log link) coded in C for efficiency.  The general
form will need to allow for evaluation of the family from R functions
and I haven't incorporated that yet.
On Jan 7, 2008 4:23 PM, Gregor Gorjanc <gregor.gorjanc at bfro.uni-lj.si> wrote:
#
On Jan 7, 2008 4:26 PM, Gregor Gorjanc <gregor.gorjanc at bfro.uni-lj.si> wrote:
I'd need to look at the code more closely but I suspect that the
results you are getting are spurious.
#
Douglas Bates <bates at ...> writes:
Thanks!