[R-sig-ME] singular convergence with lmer()
laurent stephane
laurent_step at yahoo.fr
Mon Jul 9 09:56:47 CEST 2012
Finally I have reproduced the crash. Before running lme4 I log-transform the response of the original dataset in R. Attached are the
original dataset and the R code.
library(lme4)
setwd("...")
dat <- read.csv("zzz.csv", header=TRUE, na.strings = "",
colClasses=c("factor", "factor","factor","factor","numeric"))
str(dat)
dat$Operator <- dat$Operator:dat$Day
dat$Part <- dat$Sample
dat$y <- log10(dat$Response)
dat <- droplevels(subset(dat, subset= !is.na(dat$y)))
lmer(y ~ (1|Operator)+(1|Part)+(1|Part:Operator), data=dat)
The dataset "zzz.csv" :
NumDos Day Operator Sample Response
2010_0402 1 1 1 5.3
2010_0402 1 1 1 5
2010_0402 1 1 2 35.8
2010_0402 1 1 2 34.3
2010_0402 1 1 3 61.1
2010_0402 1 1 3 61.6
2010_0402 1 1 4 130.9
2010_0402 1 1 4 135.1
2010_0402 1 1 5 206.3
2010_0402 1 1 5 195.2
2010_0402 1 1 6 479.7
2010_0402 1 1 6 462.2
2010_0402 1 1 7 780.9
2010_0402 1 1 7 818.2
2010_0402 1 1 8 1522.9
2010_0402 1 1 8 1549.8
2010_0402 1 1 9 2443.8
2010_0402 1 1 9 3150.9
2010_0402 1 1 10 5406.3
2010_0402 1 1 10 5304.8
2010_0402 1 1 11 6686.4
2010_0402 1 1 11 6536.1
2010_0402 1 1 12 9864.9
2010_0402 1 1 12 9448
2010_0402 1 2 1 5.2
2010_0402 1 2 1 5.2
2010_0402 1 2 2 36
2010_0402 1 2 2 37
2010_0402 1 2 3 67.3
2010_0402 1 2 3 69.2
2010_0402 1 2 4 146.3
2010_0402 1 2 4 138.9
2010_0402 1 2 5 210.4
2010_0402 1 2 5 210.8
2010_0402 1 2 6 534.9
2010_0402 1 2 6 506.1
2010_0402 1 2 7 757.2
2010_0402 1 2 7 813.2
2010_0402 1 2 8 1659.9
2010_0402 1 2 8 1790.3
2010_0402 1 2 9 3478.3
2010_0402 1 2 9 3469.4
2010_0402 1 2 10 6377.7
2010_0402 1 2 10 5758.9
2010_0402 1 2 11 8258.3
2010_0402 1 2 11 7317.2
2010_0402 1 2 12 10461
2010_0402 1 2 12 10155.5
2010_0402 2 1 1 4.9
2010_0402 2 1 1 5.2
2010_0402 2 1 2 35
2010_0402 2 1 2 31
2010_0402 2 1 3 57.9
2010_0402 2 1 3 60.1
2010_0402 2 1 4 133.8
2010_0402 2 1 4 136.9
2010_0402 2 1 5 173.7
2010_0402 2 1 5 179.9
2010_0402 2 1 6 457.2
2010_0402 2 1 6 489.8
2010_0402 2 1 7 773.9
2010_0402 2 1 7 799.2
2010_0402 2 1 8 1435.1
2010_0402 2 1 8 1536.5
2010_0402 2 1 9 3714.1
2010_0402 2 1 9 3880.5
2010_0402 2 1 10 5327.9
2010_0402 2 1 10 5548.3
2010_0402 2 1 11 7548.1
2010_0402 2 1 11 7206.5
2010_0402 2 1 12 9947.5
2010_0402 2 1 12 10477.1
2010_0402 2 2 1 5.7
2010_0402 2 2 1 5.4
2010_0402 2 2 2 37.6
2010_0402 2 2 2 37.3
2010_0402 2 2 3 66.2
2010_0402 2 2 3 51.6
2010_0402 2 2 4 121.3
2010_0402 2 2 4 139.8
2010_0402 2 2 5 199
2010_0402 2 2 5 231.7
2010_0402 2 2 6 514.7
2010_0402 2 2 6 605.7
2010_0402 2 2 7 856.6
2010_0402 2 2 7 867.6
2010_0402 2 2 8 1539.2
2010_0402 2 2 8 1691.8
2010_0402 2 2 9 4337.8
2010_0402 2 2 9 4744.2
2010_0402 2 2 10 8121.6
2010_0402 2 2 10 6447.1
2010_0402 2 2 11 8577
2010_0402 2 2 11 8148.4
2010_0402 2 2 12 13747.7
2010_0402 2 2 12 12335
2010_0402 3 1 1 4.8
2010_0402 3 1 1 4.8
2010_0402 3 1 2 36.6
2010_0402 3 1 2 35.6
2010_0402 3 1 3 69.3
2010_0402 3 1 3 70.6
2010_0402 3 1 4 147.3
2010_0402 3 1 4 141.4
2010_0402 3 1 5 190.9
2010_0402 3 1 5 162.5
2010_0402 3 1 6 525.6
2010_0402 3 1 6 488.7
2010_0402 3 1 7 885.3
2010_0402 3 1 7 866.9
2010_0402 3 1 8 1590.9
2010_0402 3 1 8 1662.9
2010_0402 3 1 9 4146.9
2010_0402 3 1 9 4962.8
2010_0402 3 1 10 5005.8
2010_0402 3 1 10 5787.6
2010_0402 3 1 11 7605.6
2010_0402 3 1 11 7996.6
2010_0402 3 1 12 10513.9
2010_0402 3 1 12 11256.8
2010_0402 3 2 1 5.4
2010_0402 3 2 1 5.4
2010_0402 3 2 2 34.8
2010_0402 3 2 2 37.6
2010_0402 3 2 3 63.7
2010_0402 3 2 3 65.4
2010_0402 3 2 4 149.5
2010_0402 3 2 4 152.5
2010_0402 3 2 5 201.4
2010_0402 3 2 5 210.9
2010_0402 3 2 6 470
2010_0402 3 2 6 459.5
2010_0402 3 2 7 885.3
2010_0402 3 2 7 829
2010_0402 3 2 8 1781.6
2010_0402 3 2 8 1555.1
2010_0402 3 2 9 4215.3
2010_0402 3 2 9 3966.9
2010_0402 3 2 10 5063.7
2010_0402 3 2 10 5365.4
2010_0402 3 2 11 7441.6
2010_0402 3 2 11 7592.1
2010_0402 3 2 12 10769.1
2010_0402 3 2 12 10955.4
2010_0402 5 1 1 6
2010_0402 5 1 1 5.8
2010_0402 5 1 2 38.8
2010_0402 5 1 2 38.5
2010_0402 5 1 3 68.4
2010_0402 5 1 3 67.4
2010_0402 5 1 4 149.8
2010_0402 5 1 4 158.2
2010_0402 5 1 5 193.1
2010_0402 5 1 5 190.6
2010_0402 5 1 6 478.6
2010_0402 5 1 6 499.9
2010_0402 5 1 7 914
2010_0402 5 1 7 897.2
2010_0402 5 1 8 1543.3
2010_0402 5 1 8 1387.3
2010_0402 5 1 9 3574.1
2010_0402 5 1 9 3640.9
2010_0402 5 1 10 5371.4
2010_0402 5 1 10 5583.8
2010_0402 5 1 11 8196.4
2010_0402 5 1 11 7754.8
2010_0402 5 1 12 10663
2010_0402 5 1 12 12536.7
2010_0402 5 2 1 6.7
2010_0402 5 2 1 6.2
2010_0402 5 2 2 38.9
2010_0402 5 2 2 40.4
2010_0402 5 2 3 65.9
2010_0402 5 2 3 65.2
2010_0402 5 2 4 139.8
2010_0402 5 2 4 137.3
2010_0402 5 2 5 231.3
2010_0402 5 2 5 217.4
2010_0402 5 2 6 540.9
2010_0402 5 2 6 500.9
2010_0402 5 2 7 807.5
2010_0402 5 2 7 866.3
2010_0402 5 2 8 1539.8
2010_0402 5 2 8 1531.4
2010_0402 5 2 9 3556.9
2010_0402 5 2 9 3328.2
2010_0402 5 2 10 5113.4
2010_0402 5 2 10 5553.9
2010_0402 5 2 11 7782.7
2010_0402 5 2 11 6404.3
2010_0402 5 2 12 9499.8
2010_0402 5 2 12 9876.5
________________________________
De : Ben Bolker <bbolker at gmail.com>
À : r-sig-mixed-models at r-project.org
Envoyé le : Dimanche 8 juillet 2012 21h58
Objet : Re: [R-sig-ME] singular convergence with lmer()
laurent stephane <laurent_step at ...> writes:
>
> Dear all,
>
> Using the latest CRAN version of lme4
> I get the following warning from lmer() :
>
> Warning message:
> In mer_finalize(ans) : singular convergence (7)
> My model is not complicated and it works fine with SAS (if you are
> interested in the details of my model see
> forums.cirad.fr/logiciel-R/viewtopic.php?t=5071 )
> What argument could I change in lmer() to overcome this warning ?
>
This warning emerges from the nlminb optimizer used in the guts
of lme4, and I don't think there's much you can do to suppress it
or change the behavior of nlminb to avoid it. The best you could
do would be to use other packages (SAS, other versions of lme4 or
nlme, etc.) to see if the correct answer was achieved despite the
warning.
Ben Bolker
_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
More information about the R-sig-mixed-models
mailing list