[R-sig-ME] lmer nonconvergent: care to run and explain?

Paul Johnson pauljohn32 at gmail.com
Thu Oct 15 16:49:51 CEST 2015


On Wed, Oct 14, 2015 at 7:19 PM, David Duffy
<David.Duffy at qimrberghofer.edu.au> wrote:
> Is it because Mind is not declared a factor?
>
> dat$Mind <- factor(dat$Mind)
> lmer( y3s ~ x1s + x2s + x3s + (x1s | Mind), data = dat)
> Linear mixed model fit by REML ['lmerMod']
> Formula: y3s ~ x1s + x2s + x3s + (x1s | Mind)
>    Data: dat
> REML criterion at convergence: 33271.78
> Random effects:
>  Groups   Name        Std.Dev. Corr
>  Mind     (Intercept) 0.6837
>           x1s         0.1373   1.00
>  Residual             0.6997
> Number of obs: 15419, groups:  Mind, 100
> Fixed Effects:
> (Intercept)          x1s          x2s          x3s
>   -0.003039     0.117080    -0.163680     0.055911
>
>
> | David Duffy (MBBS PhD)
> | email: David.Duffy at qimrberghofer.edu.au  ph: INT+61+7+3362-0217 fax: -0101
> | Genetic Epidemiology, QIMR Berghofer Institute of Medical Research
> | 300 Herston Rd, Brisbane, Queensland 4006, Australia  GPG 4D0B994A

Interesting. I think there's a ghost in the machine.

I see no benefit.

The unscaled one still fails:

> dat$Mind <- as.factor(dat$Mind)
> mm3 <- lmer( y3 ~ x1 + x2 + x3 + (1|Mind) + (0 + x1 | Mind), data=dat, verbose=3)

...
350:     143253.09: 9.88456e-06 0.00975148
351:     143253.09: 9.88260e-06 0.00975168
352:     143253.09: 9.69049e-06 0.00975152
353:     143253.09: 9.44279e-06 0.00975152
354:     143253.09: 9.61561e-06 0.00975152
At return
eval: 354 fn:      143253.09 par: 9.44279e-06 0.00975152
Warning message:
In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model is nearly unidentifiable: very large eigenvalue
 - Rescale variables?

And the scaled one is still a failure on my system

dat[ , c("x1s", "x2s", "x3s")] <- lapply(dat[, c("x1", "x2", "x3")], scale)
dat$y3s <- scale(dat$y3)
mm3 <- lmer( y3s ~ x1s + x2s + x3s + (1 | Mind) + (0 + x1 | Mind),
            data=dat, verbose = 3)

rho:  2.0e-07 eval: 186 fn:      33271.8 par: 0.00000 0.00975124
187:     33271.783:  0.00000 0.00975151
188:     33271.783: 5.40934e-07 0.00975153
189:     33271.783: 1.08231e-06 0.00975153
190:     33271.783: 6.32312e-07 0.00975153
At return
eval: 190 fn:      33271.783 par: 5.40934e-07 0.00975153
Warning message:
In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model is nearly unidentifiable: very large eigenvalue
 - Rescale variables?


Since you don't get errors, I wonder if it means you are using
different version of R, or lmer?  Can we see your sessionInfo for
comparison:


> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 15.04

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] lme4_1.1-10  Matrix_1.2-2 MASS_7.3-44

loaded via a namespace (and not attached):
[1] minqa_1.2.4     compiler_3.2.2  tools_3.2.2     Rcpp_0.12.1
[5] splines_3.2.2   nlme_3.1-122    grid_3.2.2      nloptr_1.0.4
[9] lattice_0.20-33


-- 
Paul E. Johnson
Professor, Political Science        Director
1541 Lilac Lane, Room 504      Center for Research Methods
University of Kansas                 University of Kansas
http://pj.freefaculty.org              http://crmda.ku.edu



More information about the R-sig-mixed-models mailing list