[R-sig-ME] lme4 convergence problem

Jens Åström jens.astrom at slu.se
Fri Jan 14 09:21:25 CET 2011


For what its worth, it seems to converge fine with the same lme4 version 
for me (64-bit Ubuntu).

/Jens Åström



############################
 > M1 <- lmer (y ~ x + (1 + x | eth), verbose = TRUE)
   0:     3113.7366: 0.0947958 0.00141417  0.00000
   1:     3113.5186:  0.00000  0.00000 -0.991534
   2:     3113.1254: 0.00106587 0.00111323 -0.991534
   3:     3112.9224: 0.000649402 0.000651994 -0.991533
   4:     3112.9133: 0.000831091 0.000668583 -0.990939
   5:     3112.9121: 0.000715462 0.000730478 -0.991547
   6:     3112.9117: 0.000905064 0.000535491 -0.990988
   7:     3112.9114: 0.000875046 0.000513547 -0.990988
   8:     3112.9112: 0.000890528 0.000517667 -0.990954
   9:     3112.9111: 0.000908576 0.000472032 -0.990898
  10:     3112.9110: 0.000923350 0.000460076 -0.990751
  11:     3112.9106: 0.000990675 0.000318092 -0.989763
  12:     3112.9103: 0.00103703  0.00000 -0.987788
  13:     3112.9103: 0.00104146  0.00000 -0.987788
  14:     3112.9102: 0.00104009 5.88247e-09 -0.987784
  15:     3112.9102: 0.00104009 2.20910e-08 -0.987784
  16:     3112.9102: 0.00104008 2.18536e-08 -0.987784
  17:     3112.9102: 0.00104009 2.18149e-08 -0.987784
  18:     3112.9102: 0.00104051  0.00000 -0.985659
  19:     3112.9102: 0.00104116  0.00000 -0.984619
  20:     3112.9102: 0.00104445  0.00000 -0.980459
  21:     3112.9102: 0.00105905  0.00000 -0.964003
  22:     3112.9102: 0.00107541 1.39601e-08 -0.947546 

  23:     3112.9101: 0.00111718 7.49440e-08 -0.909138
  24:     3112.9100: 0.00115003 1.57422e-07 -0.883796
  25:     3112.9096: 0.00124461 4.76953e-07 -0.822235
  26:     3112.9095: 0.00138054 9.20557e-07 -0.731447
  27:     3112.9089: 0.00141981 1.21393e-06 -0.727973
  28:     3112.9086: 0.00159345 1.97301e-06 -0.638614
  29:     3112.9084: 0.00157727 1.95259e-06 -0.653646
  30:     3112.9080: 0.00170754 2.64585e-06 -0.603259
  31:     3112.9078: 0.00176451 2.92616e-06 -0.585096
  32:     3112.9074: 0.00188177 3.46498e-06 -0.548768
  33:     3112.9069: 0.00205195 4.08623e-06 -0.513571
  34:     3112.9063: 0.00217876 4.48147e-06 -0.478373
  35:     3112.9061: 0.00223981 4.67892e-06 -0.464294
  36:     3112.9057: 0.00237979 5.04167e-06 -0.436136
  37:     3112.9053: 0.00247364 5.26682e-06 -0.421356
  38:     3112.9047: 0.00265567 5.68598e-06 -0.391797
  39:     3112.9041: 0.00282583 6.16506e-06 -0.374175
  40:     3112.9036: 0.00295732 6.41165e-06 -0.356553
  41:     3112.9031: 0.00310334 6.61179e-06 -0.338059
  42:     3112.9028: 0.00326419 6.66967e-06 -0.319565
  43:     3112.9023: 0.00353098 6.34532e-06 -0.293223
  44:     3112.9015: 0.00366131 5.61928e-06 -0.286056
  45:     3112.9000: 0.00423986 3.14115e-06 -0.246252
  46:     3112.8959: 0.00542770  0.00000 -0.206462
  47:     3112.8949: 0.00630358  0.00000 -0.166664
  48:     3112.8936: 0.00586774  0.00000 -0.188443
  49:     3112.8922: 0.00624038  0.00000 -0.176172
  50:     3112.8914: 0.00650870  0.00000 -0.168588
  51:     3112.8898: 0.00711278  0.00000 -0.153422
  52:     3112.8890: 0.00818397  0.00000 -0.131049
  53:     3112.8858: 0.00817067 2.36794e-08 -0.136501
  54:     3112.8822: 0.00911498 6.24849e-08 -0.125249
  55:     3112.8800: 0.00974868 5.60750e-08 -0.118118
  56:     3112.8741: 0.0116162  0.00000 -0.103926
  57:     3112.8716: 0.0122596  0.00000 -0.0986270
  58:     3112.8672: 0.0135520  0.00000 -0.0880301
  59:     3112.8645: 0.0142831  0.00000 -0.0846199
  60:     3112.8576: 0.0162593 1.06499e-07 -0.0779304
  61:     3112.8551: 0.0217182  0.00000 -0.0555767
  62:     3112.8468: 0.0195786  0.00000 -0.0681183
  63:     3112.8366: 0.0222284  0.00000 -0.0605319
  64:     3112.8320: 0.0235412  0.00000 -0.0575979
  65:     3112.8201: 0.0269437  0.00000 -0.0521435
  66:     3112.7524: 0.0466922  0.00000 -0.0356741
  67:     3112.7475: 0.0478924  0.00000 -0.0365679
  68:     3112.7434: 0.0488071 5.94963e-09 -0.0353835
  69:     3112.7349: 0.0517965  0.00000 -0.0352410
  70:     3112.6930: 0.0689228  0.00000 -0.0275686
  71:     3112.6347: 0.0874596  0.00000 -0.0246426
  72:     3112.4998: 0.128126  0.00000 -0.0241848
  73:     3112.3211: 0.168626  0.00000 -0.0204847
  74:     3112.2845: 0.184867  0.00000 -0.0195481
  75:     3112.1392: 0.249913 2.94892e-09 -0.0177825
  76:     3111.8481: 0.314982 4.35468e-09 -0.0174665
  77:     3110.9815: 0.575260 7.16356e-09 -0.0164398
  78:     3110.9650: 0.575263 9.92164e-10 -0.0166145
  79:     3110.4338: 0.797900  0.00000 -0.0160382
  80:     3110.2156:  1.26222  0.00000 -0.0154387
  81:     3110.0255:  1.50412  0.00000 -0.0160248
  82:     3109.7639:  1.43338  0.00000 -0.0157829
  83:     3109.7492:  1.48389  0.00000 -0.0156978
  84:     3109.7466:  1.50972  0.00000 -0.0157034
  85:     3109.7460:  1.53269  0.00000 -0.0157009
  86:     3109.7460:  1.53351  0.00000 -0.0157010
  87:     3109.7460:  1.53352  0.00000 -0.0157010


 > sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-pc-linux-gnu (64-bit)

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

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

other attached packages:
[1] lme4_0.999375-37   Matrix_0.999375-46 lattice_0.19-17

loaded via a namespace (and not attached):
[1] grid_2.12.1   nlme_3.1-97   stats4_2.12.1 tools_2.12.1

###################################################################


>
> Message: 3
> Date: Fri, 14 Jan 2011 10:39:29 +1300
> From: Murray Jorgensen<maj at stats.waikato.ac.nz>
> To: R Mixed Models<r-sig-mixed-models at r-project.org>,  Doug and Martin
>          <Matrix-authors at r-project.org>
> Subject: [R-sig-ME] lme4 convergence problem
> Message-ID:<4D2F7111.4070702 at stats.waikato.ac.nz>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Dear List&  Maintainers,
>
> I am currently running some scripts for some of the data sets in the
> book by Andrew Gelman and Jennifer Hill. (2006). (Data Analysis Using
> Regression and Multilevel/Hierarchical Models. Cambridge University
> Press.) "arm"
>
> However I have encountered a convergence difference between two versions
> of R and its packages which seems to be a purely lme4 issue.
>
> I have been mostly using a Dell laptop running Windows XP. Previously I
> had been using R 2.11.1 but with packages at 2.10.1. Now I have brought
> R and the packages both up to 2.12.1.
>
> Here is my script: it uses the attached file which has itself been
> constructed using a a script from the "arm" website but is self-contained.
>
> library(lme4)
> heights.clean =
> read.table("C:\\Files\\R&Splus\\Gelman\\examples\\earnings\\heights.clean.txt",
>
>                   header = TRUE)
> attach(heights.clean)
> y<- log(earn)
> x<- height
> n<- length(y)
> n.age<- 3
> n.eth<- 4
> age<- age.category
> # regression of log (earnings) on height, age, and ethnicity
> M1<- lmer (y ~ x + (1 + x | eth))
> summary (M1)
> M1<- lmer (y ~ x + (1 + x | eth), verbose = TRUE)
>
>
> Verbose output from R 2.12.1 and lme4_0.999375-37:
>
>   >  M1<- lmer (y ~ x + (1 + x | eth), verbose = TRUE)
>     0:     3113.7366: 0.0947958 0.00141417  0.00000
>     1:     3113.5186:  0.00000  0.00000 -0.991536
>     2:     3113.1254: 0.00106590 0.00111325 -0.991536
>     3:     3112.9224: 0.000649400 0.000651990 -0.991536
>     4:     3112.9133: 0.000831104 0.000668572 -0.990942
>     5:     3112.9121: 0.000715470 0.000730468 -0.991549
>     6:     3112.9117: 0.000904225 0.000536358 -0.990990
>     7:     3112.9114: 0.000874136 0.000514266 -0.990990
>     8:     3112.9112: 0.000889956 0.000518593 -0.990956
>     9:     3112.9111: 0.000908394 0.000472281 -0.990901
>    10:     3112.9110: 0.000923320 0.000460105 -0.990753
>    11:     3112.9106: 0.000995159 0.000309059 -0.989729
>    12:     3112.9103: 0.00103245  0.00000 -0.988338
>    13:     3112.9103: 0.00104480 1.00631e-09 -0.988338
>    14:     3112.9103: 0.00103952 1.72994e-08 -0.988327
>    15:     3112.9103: 0.00103952 2.02562e-08 -0.988327
>    16:     3112.9103: 0.00103951 2.01450e-08 -0.988327
>    17:     3112.9103: 0.00103951 2.01450e-08 -0.988327
>    18:     3112.9103: 0.00103951 2.01450e-08 -0.988327
> Warning message:
> In mer_finalize(ans) : false convergence (8)
>
>
> Verbose output from R 2.11.1 and lme4_0.999375-32:
>
>   >  M1<- lmer (y ~ x + (1 + x | eth), verbose = TRUE)
>     0:     3113.7366: 0.0947958 0.00141417  0.00000
>     1:     3113.5186:  0.00000  0.00000 -0.991536
>     2:     3113.1254: 0.00106590 0.00111325 -0.991536
>     3:     3112.9224: 0.000649400 0.000651990 -0.991536
>     4:     3112.9133: 0.000831104 0.000668572 -0.990942
>     5:     3112.9121: 0.000715470 0.000730468 -0.991549
>     6:     3112.9117: 0.000904407 0.000536168 -0.990990
>     7:     3112.9114: 0.000874337 0.000514111 -0.990990
>     8:     3112.9112: 0.000890081 0.000518391 -0.990956
>     9:     3112.9111: 0.000908420 0.000472254 -0.990901
>    10:     3112.9110: 0.000923309 0.000460131 -0.990753
>    11:     3112.9106: 0.000994079 0.000311231 -0.989738
>    12:     3112.9103: 0.00103382  0.00000 -0.988215
>    13:     3112.9102: 0.00103963 3.55942e-10 -0.988215
>    14:     3112.9099: 0.00114005 0.000142779 -0.893828
>    15:     3112.9099: 0.00113930 9.68963e-05 -0.893828
>    16:     3112.9099: 0.00114352 9.70670e-05 -0.893805
>    17:     3112.9099: 0.00114631 9.68698e-05 -0.893782
>    18:     3112.9099: 0.00114593 8.96231e-05 -0.893737
>    19:     3112.9099: 0.00114697 8.94093e-05 -0.893635
>    20:     3112.9099: 0.00114840 8.74568e-05 -0.893534
>    21:     3112.9099: 0.00114767 8.69236e-05 -0.893331
>    22:     3112.9099: 0.00114960 8.45012e-05 -0.892925
>    23:     3112.9097: 0.00119713 0.000103484 -0.854718
>    24:     3112.9096: 0.00123584 0.000118803 -0.823861
>    25:     3112.9094: 0.00128530 0.000135095 -0.793003
>    26:     3112.9092: 0.00134505 0.000150925 -0.755646
>    27:     3112.9088: 0.00148850 0.000172432 -0.680932
>    28:     3112.9087: 0.00158189 0.000173348 -0.654113
>    29:     3112.9080: 0.00172167 0.000172246 -0.591365
>    30:     3112.9078: 0.00178884 0.000169040 -0.566266
>    31:     3112.9071: 0.00202232 2.33096e-05 -0.506894
>    32:     3112.9067: 0.00207199  0.00000 -0.501077
>    33:     3112.9063: 0.00219029  0.00000 -0.475171
>    34:     3112.9059: 0.00228481  0.00000 -0.456053
>    35:     3112.9052: 0.00250518 6.54281e-05 -0.417817
>    36:     3112.9048: 0.00260386 6.61956e-05 -0.402523
>    37:     3112.9041: 0.00281388 6.37610e-05 -0.371934
>    38:     3112.9037: 0.00294734 5.86692e-05 -0.358875
>    39:     3112.9029: 0.00315988 1.53970e-05 -0.332756
>    40:     3112.9023: 0.00333904 5.76185e-05 -0.315483
>    41:     3112.9022: 0.00337566 5.68599e-05 -0.315484
>    42:     3112.9022: 0.00337228 2.04001e-05 -0.315482
>    43:     3112.9022: 0.00339045 1.50348e-05 -0.315412
>    44:     3112.9022: 0.00338041 1.25433e-05 -0.315376
>    45:     3112.9022: 0.00338454 4.34985e-07 -0.315304
>    46:     3112.9007: 0.00380902 4.53446e-07 -0.277795
>    47:     3112.9001: 0.00401754  0.00000 -0.262792
>    48:     3112.8984: 0.00456608  0.00000 -0.231839
>    49:     3112.8956: 0.00545144 1.95070e-06 -0.195416
>    50:     3112.8928: 0.00652406 1.16379e-05 -0.175790
>    51:     3112.8916: 0.00660908  0.00000 -0.163760
>    52:     3112.8890: 0.00773482 4.99796e-06 -0.139726
>    53:     3112.8806: 0.00972168  0.00000 -0.121025
>    54:     3112.8786: 0.0114761 5.99051e-06 -0.0970285
>    55:     3112.8760: 0.0109215 6.10952e-06 -0.107449
>    56:     3112.8703: 0.0130487  0.00000 -0.0891341
>    57:     3112.8672: 0.0146986  0.00000 -0.0791535
>    58:     3112.8538: 0.0174766  0.00000 -0.0712682
>    59:     3112.8464: 0.0196425 9.24134e-08 -0.0648869
>    60:     3112.8229: 0.0261589 1.12351e-07 -0.0530892
>    61:     3112.8218: 0.0301145  0.00000 -0.0522032
>    62:     3112.8064: 0.0310301 2.94121e-08 -0.0482541
>    63:     3112.7853: 0.0370813  0.00000 -0.0428581
>    64:     3112.7768: 0.0392902 5.51626e-07 -0.0404835
>    65:     3112.7574: 0.0448577  0.00000 -0.0371558
>    66:     3112.7034: 0.0688045 9.08273e-06 -0.0271719
>    67:     3112.5859: 0.0947196 0.000137210 -0.0259377
>    68:     3112.5520: 0.120260  0.00000 -0.0214016
>    69:     3112.4267: 0.138009  0.00000 -0.0220440
>    70:     3112.2524: 0.241689  0.00000 -0.0175340
>    71:     3112.0653: 0.252030 5.74985e-06 -0.0195906
>    72:     3111.6754: 0.350688  0.00000 -0.0176928
>    73:     3111.5729: 0.396312  0.00000 -0.0169346
>    74:     3111.4491: 0.441941  0.00000 -0.0166439
>    75:     3110.9290: 0.624460  0.00000 -0.0161161
>    76:     3110.0355:  1.03912  0.00000 -0.0160134
>    77:     3109.9542:  1.12017  0.00000 -0.0157653
>    78:     3109.8078:  1.29685  0.00000 -0.0157324
>    79:     3109.7519:  1.45344  0.00000 -0.0157254
>    80:     3109.7469:  1.52828  0.00000 -0.0156867
>    81:     3109.7461:  1.53677  0.00000 -0.0157060
>    82:     3109.7460:  1.53350  0.00000 -0.0157010
>    83:     3109.7460:  1.53352  0.00000 -0.0157010
>
>
>
> The two iterations start off at the same values but start to diverge
> around step 12.
>
> Murray
>
> --
> Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html
> Department of Statistics, University of Waikato, Hamilton, New Zealand
> Email: maj at waikato.ac.nz                                Fax 7 838 4155
> Phone  +64 7 838 4773 wk    Home +64 7 825 0441   Mobile 021 0200 8350
>
> -------------- next part --------------
> An embedded and charset-unspecified text was scrubbed...
> Name: heights.clean.txt
> URL:<https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20110114/f2d292df/attachment.txt>
>
> ------------------------------
>
> _______________________________________________
> R-sig-mixed-models mailing list
> R-sig-mixed-models at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
> End of R-sig-mixed-models Digest, Vol 49, Issue 25
> **************************************************




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