R version 2.5.0 Under development (unstable) (2007-01-26 r40579) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. [Previously saved workspace restored] > library(lme4) Loading required package: Matrix Loading required package: lattice > > ## simple random effects model using Rail data from Pinheiro and Bates (2000) > data(Rail, package = 'nlme') > system.time(fm1 <- lmer(travel ~ 1|Rail, Rail, + control = list(niterEM = 0, msVerbose = 1, grad = 0))) 0 143.991: 0.888889 1 137.777: 1.88889 2 134.226: 2.88889 3 130.510: 4.63386 4 127.743: 6.90217 5 125.593: 10.0019 6 124.104: 13.8871 7 123.139: 18.5529 8 122.619: 23.2809 9 122.346: 28.0089 10 122.217: 32.7369 11 122.182: 36.0248 12 122.177: 37.6149 13 122.177: 38.0213 user system elapsed 0.04 0.00 0.04 > system.time(m1 <- lmer2(travel ~ 1|Rail, Rail, + control = list(msVerbose = 1))) 0 143.991: 0.942809 1 132.078: 1.94281 2 126.612: 2.88213 3 123.916: 3.81952 4 122.727: 4.69293 5 122.300: 5.41244 6 122.192: 5.89192 7 122.178: 6.11133 8 122.177: 6.16458 user system elapsed 0.016 0.000 0.018 > fm1 Linear mixed-effects model fit by REML Formula: travel ~ 1 | Rail Data: Rail AIC BIC logLik MLdeviance REMLdeviance 126.2 128.0 -61.09 128.6 122.2 Random effects: Groups Name Variance Std.Dev. Rail (Intercept) 614.863 24.7964 Residual 16.172 4.0214 number of obs: 18, groups: Rail, 6 Fixed effects: Estimate Std. Error t value (Intercept) 66.50 10.17 6.541 > m1 Linear mixed-effects model fit by REML Formula: travel ~ 1 | Rail Data: Rail AIC BIC logLik MLdeviance REMLdeviance 126.2 128.0 -61.09 128.6 122.2 Random effects: Groups Name Variance Std.Dev. Rail (Intercept) 614.641 24.7920 Residual 16.174 4.0217 Number of obs: 18, groups: Rail, 6 Fixed effects: Estimate Std. Error t value (Intercept) 66.50 10.17 6.542 > dput(deviance(fm1)) 122.177002645585 > dput(unname(deviance(m1))) 122.177004910459 > > ## single grouping factor, bivariate random effects and fixed effects > system.time(fm2 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy, + control = list(niterEM = 0, msVerbose = 1, grad = 0))) 0 1768.41: 0.266667 0.00935673 0.00000 1 1760.81: 0.272293 0.257488 -0.000619700 2 1755.27: 0.587705 0.247295 -0.0189008 3 1753.36: 0.668894 0.219921 0.285372 4 1745.53: 0.684470 0.0870499 0.284458 5 1744.76: 0.686074 0.0704934 0.284194 6 1744.46: 0.687657 0.0590246 0.283876 7 1744.40: 0.694740 0.0532295 0.276779 8 1743.76: 0.853804 0.0548765 0.0678245 9 1743.64: 0.901868 0.0538539 -0.173630 10 1743.63: 0.923267 0.0535624 -0.269773 11 1743.63: 0.928361 0.0535161 -0.277792 user system elapsed 0.032 0.000 0.032 > system.time(m2 <- lmer2(Reaction ~ Days + (Days|Subject), sleepstudy, + control = list(msVerbose = 1))) 0 1768.41: 0.516398 0.0967302 0.00000 1 1761.98: 0.571376 0.550876 0.167098 2 1755.45: 0.790274 0.455893 0.215676 3 1745.01: 0.812187 0.239612 0.105945 4 1744.26: 0.817183 0.213878 0.0692585 5 1743.98: 0.834405 0.230508 0.0310490 6 1743.81: 0.877690 0.218241 0.0280501 7 1743.73: 0.917440 0.239525 0.0277811 8 1743.63: 0.961277 0.232347 0.0200427 9 1743.63: 0.966189 0.230952 0.0140545 10 1743.63: 0.966742 0.230824 0.0157903 user system elapsed 0.020 0.000 0.018 > fm2 Linear mixed-effects model fit by REML Formula: Reaction ~ Days + (Days | Subject) Data: sleepstudy AIC BIC logLik MLdeviance REMLdeviance 1754 1770 -871.8 1752 1744 Random effects: Groups Name Variance Std.Dev. Corr Subject (Intercept) 610.842 24.7152 Days 35.057 5.9209 0.067 Residual 655.065 25.5942 number of obs: 180, groups: Subject, 18 Fixed effects: Estimate Std. Error t value (Intercept) 251.405 6.820 36.86 Days 10.467 1.546 6.77 Correlation of Fixed Effects: (Intr) Days -0.137 > m2 Linear mixed-effects model fit by REML Formula: Reaction ~ Days + (Days | Subject) Data: sleepstudy AIC BIC logLik MLdeviance REMLdeviance 1754 1770 -871.8 1752 1744 Random effects: Groups Name Variance Std.Dev. Corr Subject (Intercept) 612.128 24.7412 Days 35.049 5.9202 0.066 Residual 654.970 25.5924 Number of obs: 180, groups: Subject, 18 Fixed effects: Estimate Std. Error t value (Intercept) 251.405 6.825 36.84 Days 10.467 1.545 6.77 Correlation of Fixed Effects: (Intr) Days -0.137 > dput(deviance(fm2)) 1743.62829625007 > dput(unname(deviance(m2))) 1743.62827553054 > > ## Repeated grouping factor generating independent univariate random effects > system.time(fm3 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), + sleepstudy, control = list(niterEM = 0, + msVerbose = 1, grad = 0))) 0 1768.41: 0.266667 0.00935673 1 1760.81: 0.272293 0.257488 2 1755.25: 0.589625 0.247319 3 1752.45: 0.732482 0.208546 4 1747.46: 0.755669 0.125514 5 1746.63: 0.756348 0.112350 6 1745.04: 0.757678 0.0860202 7 1744.57: 0.758162 0.0771035 8 1743.95: 0.759247 0.0592770 9 1743.89: 0.775169 0.0511881 10 1743.83: 0.792779 0.0541671 11 1743.72: 0.864217 0.0542017 12 1743.67: 0.938074 0.0547589 13 1743.67: 0.957122 0.0548594 14 1743.67: 0.960099 0.0548648 user system elapsed 0.036 0.000 0.036 > system.time(m3 <- lmer2(Reaction ~ Days + (1|Subject) + (0+Days|Subject), + sleepstudy, control = list(msVerbose = 1))) 0 1768.41: 0.516398 0.0967302 1 1762.72: 0.574732 0.578602 2 1753.76: 1.19735 0.484743 3 1748.88: 1.18718 0.383005 4 1745.88: 1.16563 0.179653 5 1745.01: 1.06734 0.299162 6 1743.94: 1.02100 0.260981 7 1743.79: 0.970422 0.217650 8 1743.67: 0.983119 0.237503 9 1743.67: 0.980173 0.234617 10 1743.67: 0.979878 0.234221 user system elapsed 0.02 0.00 0.02 > fm3 Linear mixed-effects model fit by REML Formula: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject) Data: sleepstudy AIC BIC logLik MLdeviance REMLdeviance 1752 1764 -871.8 1752 1744 Random effects: Groups Name Variance Std.Dev. Subject (Intercept) 627.509 25.0501 Subject Days 35.859 5.9882 Residual 653.588 25.5654 number of obs: 180, groups: Subject, 18; Subject, 18 Fixed effects: Estimate Std. Error t value (Intercept) 251.405 6.885 36.51 Days 10.467 1.560 6.71 Correlation of Fixed Effects: (Intr) Days -0.184 > m3 Linear mixed-effects model fit by REML Formula: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject) Data: sleepstudy AIC BIC logLik MLdeviance REMLdeviance 1752 1764 -871.8 1752 1744 Random effects: Groups Name Variance Std.Dev. Subject (Intercept) 627.552 25.051 Subject Days 35.856 5.988 Residual 653.590 25.565 Number of obs: 180, groups: Subject, 18; Subject, 18 Fixed effects: Estimate Std. Error t value (Intercept) 251.405 6.885 36.51 Days 10.467 1.560 6.71 Correlation of Fixed Effects: (Intr) Days -0.184 > dput(deviance(fm3)) 1743.66929362927 > dput(unname(deviance(m3))) 1743.66929362499 > > ## Small example of two partially crossed grouping factors with univariate random effects > data(ScotsSec, package = "mlmRev") > system.time(fm4 <- lmer(attain ~ 0 + sex + verbal + (1|primary) + (1|second), + ScotsSec, control = list(niterEM = 0, + msVerbose = 1, grad = 0))) 0 14868.5: 0.114896 0.0147501 1 14864.8: 0.104899 0.00425244 2 14860.7: 0.0739419 5.00000e-10 3 14860.3: 0.0729811 0.00459584 4 14860.0: 0.0685574 0.00302243 5 14860.0: 0.0670219 0.00394842 6 14860.0: 0.0659167 0.00253642 7 14860.0: 0.0658142 0.00342708 8 14859.9: 0.0649695 0.00312667 9 14859.9: 0.0649808 0.00349444 10 14859.9: 0.0649384 0.00341204 user system elapsed 0.316 0.000 0.313 > system.time(m4 <- lmer2(attain ~ 0 + sex + verbal + (1|primary) + (1|second), + ScotsSec, control = list(msVerbose = 1))) 0 14868.5: 0.338963 0.121450 1 14861.0: 0.271505 0.0960673 2 14860.7: 0.234798 0.0340391 3 14860.1: 0.257627 0.0407086 4 14860.0: 0.248885 0.0628276 5 14860.0: 0.254105 0.0616089 6 14860.0: 0.256326 0.0567312 7 14859.9: 0.255364 0.0570898 8 14859.9: 0.254656 0.0578324 9 14859.9: 0.254986 0.0580874 10 14859.9: 0.254729 0.0584165 user system elapsed 0.052 0.000 0.050 > fm4 Linear mixed-effects model fit by REML Formula: attain ~ 0 + sex + verbal + (1 | primary) + (1 | second) Data: ScotsSec AIC BIC logLik MLdeviance REMLdeviance 14870 14901 -7430 14843 14860 Random effects: Groups Name Variance Std.Dev. primary (Intercept) 0.276117 0.52547 second (Intercept) 0.014508 0.12045 Residual 4.251992 2.06204 number of obs: 3435, groups: primary, 148; second, 19 Fixed effects: Estimate Std. Error t value sexM 5.919262 0.076163 77.72 sexF 6.035225 0.075909 79.51 verbal 0.159593 0.002778 57.46 Correlation of Fixed Effects: sexM sexF sexF 0.558 verbal 0.130 0.040 > m4 Linear mixed-effects model fit by REML Formula: attain ~ 0 + sex + verbal + (1 | primary) + (1 | second) Data: ScotsSec AIC BIC logLik MLdeviance REMLdeviance 14870 14901 -7430 14843 14860 Random effects: Groups Name Variance Std.Dev. primary (Intercept) 0.27590 0.52527 second (Intercept) 0.01451 0.12046 Residual 4.25206 2.06205 Number of obs: 3435, groups: primary, 148; second, 19 Fixed effects: Estimate Std. Error t value sexM 5.919279 0.076153 77.73 sexF 6.035239 0.075899 79.52 verbal 0.159595 0.002778 57.46 Correlation of Fixed Effects: sexM sexF sexF 0.558 verbal 0.130 0.040 > dput(deviance(fm4)) 14859.9469884071 > dput(unname(deviance(m4))) 14859.9470160100 > > ## Large data set, three partially crossed grouping factors, univariate and bivariate > ## random effects > data(star, package = "mlmRev") > system.time(fm5 <- lmer(math ~ 0+eth*sx+gr+cltype+(yrs|id)+(1|tch)+(yrs|sch), + star, control = list(niterEM = 0, + msVerbose = 1, grad = 0))) 0 242697.: 1.16440 0.335239 0.00000 0.149076 0.00867985 0.00249898 0.00000 1 240182.: 1.22398 0.133992 0.0107802 0.486643 0.596311 0.707177 -0.000728211 2 239485.: 1.63607 5.00000e-10 -0.00871047 0.519828 0.619294 0.716247 0.00978764 3 239312.: 2.10715 0.158957 -0.0275936 0.553210 0.650469 0.730107 0.0234643 4 238992.: 2.58423 0.0593790 0.0192663 0.644656 0.683993 0.723662 0.0509492 5 238969.: 2.85540 0.136455 0.276842 0.791025 0.822004 0.567097 0.248931 6 238893.: 2.97442 0.119935 0.645052 0.630361 1.00718 0.483373 0.430232 7 238890.: 2.97446 0.107512 0.649718 0.636638 1.00582 0.478667 0.431630 8 238888.: 2.97336 0.114895 0.656298 0.645029 1.00353 0.470822 0.433922 9 238886.: 2.97318 0.106812 0.663404 0.652364 1.00127 0.462981 0.436203 10 238884.: 2.97232 0.117279 0.669458 0.657663 0.999090 0.455430 0.438362 11 238882.: 2.97256 0.106784 0.676092 0.662603 0.996995 0.448078 0.440460 12 238880.: 2.97179 0.117982 0.682477 0.666100 0.995285 0.440708 0.442743 13 238879.: 2.97209 0.107742 0.689914 0.669834 0.993560 0.433049 0.445120 14 238877.: 2.97145 0.118561 0.696832 0.672464 0.991973 0.425262 0.447582 15 238875.: 2.97188 0.108520 0.704553 0.675374 0.990329 0.417293 0.450066 16 238874.: 2.97137 0.119194 0.711624 0.677308 0.988780 0.409244 0.452585 17 238872.: 2.97196 0.109162 0.719270 0.679606 0.987035 0.401021 0.455052 18 238870.: 2.97158 0.119866 0.726222 0.681001 0.985426 0.392793 0.457539 19 238869.: 2.97228 0.109798 0.733793 0.682813 0.983677 0.384430 0.459990 20 238867.: 2.97203 0.120521 0.740583 0.683805 0.981982 0.376035 0.462433 21 238865.: 2.97283 0.110382 0.748005 0.685256 0.980197 0.367559 0.464843 22 238864.: 2.97265 0.121139 0.754628 0.685944 0.978440 0.359041 0.467237 23 238862.: 2.97356 0.110885 0.761766 0.687132 0.976492 0.350441 0.469560 24 238861.: 2.97346 0.121744 0.768140 0.687586 0.974638 0.341846 0.471880 25 238859.: 2.97445 0.111383 0.775043 0.688576 0.972586 0.333172 0.474131 26 238857.: 2.97441 0.122326 0.781164 0.688856 0.970605 0.324498 0.476372 27 238856.: 2.97545 0.111869 0.787874 0.689699 0.968486 0.315781 0.478565 28 238854.: 2.97545 0.122871 0.793785 0.689852 0.966398 0.307043 0.480741 29 238852.: 2.97658 0.112291 0.800177 0.690585 0.964058 0.298267 0.482832 30 238851.: 2.97662 0.123409 0.805830 0.690641 0.961834 0.289518 0.484925 31 238849.: 2.97775 0.112765 0.812132 0.691301 0.959488 0.280744 0.486987 32 238848.: 2.97782 0.123910 0.817606 0.691288 0.957117 0.271940 0.489023 33 238846.: 2.97895 0.113210 0.823840 0.691900 0.954754 0.263182 0.491063 34 238844.: 2.97902 0.124363 0.829282 0.691846 0.952353 0.254373 0.493085 35 238843.: 2.98016 0.113665 0.835505 0.692428 0.949950 0.245613 0.495118 36 238841.: 2.98023 0.124819 0.840949 0.692347 0.947501 0.236821 0.497137 37 238840.: 2.98132 0.114122 0.847346 0.692917 0.945225 0.228158 0.499222 38 238838.: 2.98132 0.125179 0.853165 0.692843 0.943003 0.219447 0.501353 39 238837.: 2.98236 0.114640 0.859950 0.693416 0.940893 0.210867 0.503560 40 238835.: 2.98229 0.125537 0.866296 0.693359 0.938901 0.202310 0.505850 41 238834.: 2.98323 0.115245 0.873755 0.693951 0.937082 0.193972 0.508267 42 238832.: 2.98310 0.125883 0.880899 0.693930 0.935347 0.185737 0.510799 43 238831.: 2.98389 0.115999 0.889423 0.694555 0.933920 0.177962 0.513552 44 238829.: 2.98369 0.126188 0.897771 0.694594 0.932422 0.170397 0.516456 45 238828.: 2.98437 0.116882 0.907587 0.695255 0.931117 0.163624 0.519624 46 238827.: 2.98414 0.126486 0.917335 0.695359 0.929503 0.157271 0.522970 47 238825.: 2.98477 0.117942 0.928501 0.696044 0.927813 0.152082 0.526595 48 238824.: 2.98464 0.126802 0.939516 0.696200 0.925482 0.147404 0.530374 49 238823.: 2.98535 0.119070 0.951596 0.696872 0.922767 0.144014 0.534365 50 238822.: 2.98541 0.127197 0.963344 0.697043 0.919318 0.141064 0.538462 51 238821.: 2.98629 0.120157 0.975745 0.697667 0.915395 0.139152 0.542693 52 238820.: 2.98657 0.127787 0.987624 0.697809 0.910862 0.137406 0.546984 53 238819.: 2.98761 0.121161 0.999959 0.698377 0.905978 0.136539 0.551392 54 238818.: 2.98807 0.128480 1.01172 0.698476 0.900644 0.135544 0.555856 55 238816.: 2.98921 0.122086 1.02384 0.698991 0.895083 0.135355 0.560456 56 238816.: 2.98978 0.129196 1.03540 0.699049 0.889192 0.134841 0.565139 57 238814.: 2.99098 0.122951 1.04726 0.699520 0.883151 0.135094 0.570000 58 238814.: 2.99161 0.129890 1.05860 0.699543 0.876858 0.134903 0.574977 59 238813.: 2.99285 0.123739 1.07017 0.699969 0.870468 0.135378 0.580171 60 238812.: 2.99352 0.130621 1.08120 0.699954 0.863878 0.135315 0.585507 61 238811.: 2.99477 0.124481 1.09241 0.700348 0.857215 0.135936 0.591124 62 238810.: 2.99543 0.131297 1.10309 0.700304 0.850374 0.136019 0.596931 63 238809.: 2.99664 0.125227 1.11388 0.700664 0.843479 0.136845 0.603128 64 238808.: 2.99727 0.131918 1.12414 0.700590 0.836430 0.136973 0.609552 65 238807.: 2.99843 0.125884 1.13440 0.700911 0.829369 0.137856 0.616467 66 238806.: 2.99901 0.132515 1.14410 0.700800 0.822162 0.137907 0.623619 67 238805.: 3.00013 0.126481 1.15366 0.701081 0.814957 0.138789 0.631341 68 238804.: 3.00067 0.133055 1.16265 0.700933 0.807580 0.138734 0.639258 69 238804.: 3.00172 0.127018 1.17134 0.701177 0.800208 0.139566 0.647812 70 238803.: 3.00222 0.133528 1.17950 0.701000 0.792630 0.139333 0.656458 71 238802.: 3.00321 0.127502 1.18724 0.701213 0.785046 0.140108 0.665737 72 238801.: 3.00369 0.133894 1.19451 0.701020 0.777197 0.139812 0.675001 73 238800.: 3.00469 0.127911 1.20132 0.701214 0.769328 0.140436 0.684800 74 238800.: 3.00513 0.134216 1.20773 0.701017 0.761199 0.140078 0.694500 75 238799.: 3.00608 0.128294 1.21367 0.701205 0.753042 0.140632 0.704666 76 238798.: 3.00652 0.134511 1.21938 0.701014 0.744622 0.140133 0.714611 77 238797.: 3.00742 0.128655 1.22453 0.701197 0.736178 0.140725 0.725011 78 238797.: 3.00782 0.134718 1.22961 0.701024 0.727474 0.140196 0.735144 79 238796.: 3.00869 0.128938 1.23416 0.701212 0.718787 0.140711 0.745669 80 238795.: 3.00906 0.134917 1.23873 0.701053 0.709859 0.140145 0.755900 81 238795.: 3.00990 0.129189 1.24280 0.701250 0.700961 0.140613 0.766479 82 238794.: 3.01023 0.135102 1.24698 0.701104 0.691842 0.140006 0.776745 83 238793.: 3.01102 0.129433 1.25064 0.701307 0.682774 0.140497 0.787365 84 238792.: 3.01131 0.135241 1.25449 0.701174 0.673506 0.139904 0.797689 85 238792.: 3.01206 0.129641 1.25783 0.701380 0.664325 0.140374 0.808360 86 238791.: 3.01231 0.135395 1.26143 0.701253 0.654969 0.139711 0.818719 87 238790.: 3.01299 0.129833 1.26450 0.701463 0.645730 0.140199 0.829443 88 238790.: 3.01317 0.135463 1.26783 0.701343 0.636322 0.139656 0.839921 89 238789.: 3.01379 0.130024 1.27064 0.701545 0.627074 0.140157 0.850776 90 238788.: 3.01391 0.135558 1.27378 0.701425 0.617696 0.139550 0.861388 91 238788.: 3.01447 0.130175 1.27638 0.701623 0.608516 0.140034 0.872382 92 238787.: 3.01452 0.135633 1.27937 0.701502 0.599198 0.139417 0.883129 93 238786.: 3.01500 0.130290 1.28186 0.701703 0.590114 0.139867 0.894255 94 238786.: 3.01498 0.135691 1.28472 0.701580 0.580900 0.139280 0.905154 95 238785.: 3.01538 0.130418 1.28706 0.701774 0.571949 0.139758 0.916453 96 238785.: 3.01530 0.135688 1.28976 0.701645 0.562889 0.139266 0.927591 97 238784.: 3.01561 0.130540 1.29194 0.701825 0.554154 0.139741 0.939147 98 238783.: 3.01544 0.135698 1.29453 0.701690 0.545344 0.139210 0.950558 99 238783.: 3.01566 0.130614 1.29664 0.701865 0.536898 0.139627 0.962373 100 238782.: 3.01541 0.135668 1.29910 0.701721 0.528366 0.139176 0.974069 101 238781.: 3.01553 0.130703 1.30111 0.701883 0.520238 0.139592 0.986171 102 238781.: 3.01520 0.135632 1.30350 0.701733 0.512060 0.139145 0.998181 103 238780.: 3.01523 0.130773 1.30546 0.701883 0.504335 0.139541 1.01060 104 238780.: 3.01481 0.135593 1.30783 0.701725 0.496552 0.139079 1.02291 105 238779.: 3.01475 0.130819 1.30978 0.701866 0.489251 0.139453 1.03562 106 238779.: 3.01427 0.135498 1.31208 0.701699 0.481902 0.139107 1.04826 107 238778.: 3.01413 0.130859 1.31404 0.701826 0.475067 0.139429 1.06127 108 238778.: 3.01356 0.135427 1.31633 0.701648 0.468230 0.139084 1.07424 109 238777.: 3.01333 0.130915 1.31831 0.701761 0.461925 0.139417 1.08755 110 238777.: 3.01272 0.135340 1.32063 0.701572 0.455585 0.139109 1.10081 111 238776.: 3.01245 0.130937 1.32267 0.701666 0.449775 0.139413 1.11437 112 238776.: 3.01182 0.135248 1.32499 0.701457 0.443942 0.139174 1.12790 113 238775.: 3.01150 0.130969 1.32708 0.701536 0.438646 0.139461 1.14171 114 238775.: 3.01084 0.135144 1.32941 0.701320 0.433356 0.139293 1.15549 115 238774.: 3.01051 0.131000 1.33156 0.701377 0.428556 0.139572 1.16951 116 238774.: 3.00986 0.135067 1.33390 0.701144 0.423753 0.139433 1.18350 117 238773.: 3.00952 0.131063 1.33602 0.701179 0.419453 0.139772 1.19772 118 238773.: 3.00888 0.134965 1.33832 0.700935 0.415136 0.139676 1.21193 119 238772.: 3.00859 0.131080 1.34047 0.700945 0.411267 0.139969 1.22631 120 238772.: 3.00802 0.134885 1.34272 0.700685 0.407345 0.139992 1.24066 121 238772.: 3.00779 0.131113 1.34484 0.700676 0.403847 0.140274 1.25517 122 238771.: 3.00728 0.134854 1.34705 0.700405 0.400344 0.140239 1.26966 123 238771.: 3.00716 0.131160 1.34909 0.700376 0.397075 0.140642 1.28425 124 238770.: 3.00676 0.134788 1.35117 0.700098 0.393846 0.140724 1.29885 125 238770.: 3.00664 0.131231 1.35301 0.700060 0.391251 0.140908 1.31364 126 238770.: 3.00633 0.134715 1.35492 0.699790 0.388226 0.141114 1.32835 127 238769.: 3.00639 0.131288 1.35671 0.699743 0.385358 0.141632 1.34311 128 238769.: 3.00608 0.134752 1.35851 0.699471 0.383426 0.141033 1.35801 129 238769.: 3.00638 0.131370 1.36049 0.699452 0.380028 0.142227 1.37261 130 238768.: 3.00625 0.134781 1.36245 0.699245 0.377393 0.142345 1.38740 131 238768.: 3.00590 0.131400 1.36359 0.699228 0.379037 0.139728 1.40220 132 238768.: 3.00748 0.134376 1.36677 0.699101 0.369013 0.144901 1.41183 133 238768.: 3.00718 0.130874 1.36961 0.699330 0.370666 0.140419 1.42591 134 238767.: 3.00561 0.135412 1.37155 0.699337 0.376154 0.135440 1.43855 135 238767.: 3.00627 0.132770 1.37621 0.699691 0.369046 0.141998 1.44944 136 238767.: 3.00834 0.136554 1.38393 0.699631 0.361176 0.134351 1.45599 137 238766.: 3.00764 0.130799 1.38572 0.699808 0.364159 0.132491 1.46986 138 238766.: 3.00599 0.133755 1.39093 0.700334 0.362205 0.138354 1.48268 139 238766.: 3.00819 0.130035 1.39476 0.699650 0.356121 0.135329 1.49539 140 238766.: 3.00798 0.134210 1.39375 0.698929 0.357405 0.132826 1.51003 141 238765.: 3.00194 0.132090 1.39083 0.699511 0.359551 0.140191 1.59755 142 238765.: 3.03468 0.134003 1.36018 0.685194 0.325234 0.135516 1.66349 143 238764.: 3.03120 0.128998 1.41869 0.721188 0.333856 0.121872 1.71594 144 238764.: 3.03026 0.143093 1.41961 0.717967 0.332636 0.125484 1.71644 145 238764.: 3.03053 0.135776 1.42016 0.717147 0.332181 0.126734 1.71667 146 238763.: 3.03014 0.133337 1.42226 0.712744 0.330028 0.131300 1.71766 147 238763.: 3.02967 0.137308 1.42815 0.710606 0.330007 0.132349 1.71763 148 238763.: 3.02896 0.134562 1.43444 0.708818 0.330877 0.132065 1.71982 149 238763.: 3.02628 0.136498 1.43898 0.706709 0.327236 0.133536 1.72205 150 238763.: 3.02277 0.134153 1.44167 0.706847 0.322442 0.133664 1.72493 151 238763.: 3.02238 0.135389 1.44682 0.704697 0.323509 0.132781 1.72959 152 238763.: 3.02256 0.133978 1.45344 0.704753 0.322467 0.133079 1.73265 153 238763.: 3.02035 0.135171 1.45359 0.706124 0.315911 0.134725 1.73422 154 238763.: 3.01852 0.133661 1.45332 0.704410 0.314541 0.133705 1.74092 155 238763.: 3.01873 0.135010 1.45727 0.702927 0.316027 0.132804 1.74672 156 238763.: 3.02090 0.134195 1.46420 0.703431 0.316753 0.133802 1.74783 157 238763.: 3.01002 0.132531 1.45868 0.705233 0.301051 0.131680 1.78803 158 238762.: 3.01446 0.135813 1.48985 0.710170 0.297266 0.133881 1.81928 159 238762.: 3.00952 0.134916 1.49934 0.702136 0.307307 0.128862 1.86071 160 238762.: 3.00790 0.134243 1.49254 0.700152 0.307493 0.133731 1.86384 161 238762.: 3.01391 0.134290 1.49041 0.700544 0.304385 0.133798 1.85781 162 238762.: 3.01226 0.134199 1.49260 0.700875 0.303919 0.133997 1.84893 163 238762.: 3.01186 0.134317 1.49231 0.701712 0.304186 0.134159 1.84523 user system elapsed 124.232 14.540 138.976 > system.time(m5 <- lmer2(math ~ 0+eth*sx+gr+cltype+(yrs|id)+(1|tch)+(yrs|sch), + star, control = list(msVerbose = 1))) 0 242697.: 1.07907 0.578998 0.00000 0.386104 0.0931657 0.0499898 0.00000 1 240308.: 1.40514 0.00000 -0.107100 1.04662 0.370844 0.228723 0.00652135 2 240205.: 1.44730 0.000145146 0.182910 1.02768 0.372143 0.226202 0.00539942 3 239310.: 1.43002 0.0156378 0.0671899 0.941719 0.377147 0.212983 -0.00115762 4 239216.: 1.52664 0.0217379 -0.0293318 0.892221 0.395467 0.211423 -0.0103698 5 239092.: 1.58008 0.0791069 0.0171438 0.780348 0.414253 0.201057 -0.0270880 6 238960.: 1.58672 0.213584 -0.00121700 0.752631 0.449599 0.213676 -0.0574305 7 238935.: 1.58956 0.220035 -0.0253085 0.757438 0.452642 0.215129 -0.0596780 8 238918.: 1.60110 0.239304 -0.0170804 0.764326 0.457970 0.217423 -0.0637121 9 238904.: 1.60977 0.249982 -0.0368329 0.771042 0.463069 0.219514 -0.0675462 10 238891.: 1.62099 0.266243 -0.0223049 0.775168 0.468528 0.221433 -0.0717548 11 238878.: 1.62974 0.276732 -0.0417723 0.779798 0.475494 0.223836 -0.0770794 12 238868.: 1.64191 0.292528 -0.0297364 0.782844 0.483833 0.226491 -0.0835015 13 238858.: 1.65056 0.300413 -0.0471192 0.785013 0.495464 0.230211 -0.0922519 14 238848.: 1.66269 0.303936 -0.0351940 0.786401 0.510387 0.234576 -0.103390 15 238839.: 1.67217 0.299037 -0.0479375 0.789002 0.525632 0.237742 -0.115395 16 238831.: 1.68047 0.309223 -0.0389047 0.789561 0.540863 0.238680 -0.128893 17 238824.: 1.68778 0.313069 -0.0515926 0.791565 0.555888 0.238324 -0.143403 18 238816.: 1.69634 0.307402 -0.0406105 0.793808 0.570502 0.237322 -0.158363 19 238810.: 1.70273 0.312698 -0.0521309 0.796106 0.584750 0.235587 -0.174388 20 238805.: 1.70762 0.326359 -0.0444981 0.795822 0.597531 0.233393 -0.189636 21 238799.: 1.71487 0.313743 -0.0504872 0.798927 0.610787 0.231851 -0.204941 22 238796.: 1.72446 0.318529 -0.0399818 0.802134 0.624798 0.230497 -0.220299 23 238790.: 1.72677 0.329497 -0.0529718 0.802105 0.637875 0.228769 -0.234485 24 238786.: 1.73853 0.326601 -0.0449994 0.805754 0.653671 0.228111 -0.248487 25 238783.: 1.73812 0.319674 -0.0542639 0.805498 0.672780 0.227795 -0.261537 26 238779.: 1.73994 0.333282 -0.0511780 0.804612 0.690686 0.226782 -0.273749 27 238777.: 1.75024 0.324651 -0.0568990 0.807825 0.710811 0.226824 -0.280140 28 238775.: 1.75350 0.326263 -0.0476587 0.809471 0.714623 0.227432 -0.281066 29 238774.: 1.75326 0.330976 -0.0540288 0.810616 0.721278 0.228476 -0.283808 30 238772.: 1.76186 0.332268 -0.0501760 0.814515 0.723857 0.228587 -0.285983 31 238771.: 1.76473 0.329620 -0.0553325 0.812741 0.731663 0.225633 -0.287539 32 238771.: 1.76545 0.332799 -0.0522450 0.814381 0.740156 0.229138 -0.290670 33 238770.: 1.76501 0.333594 -0.0565380 0.816852 0.749020 0.228835 -0.294281 34 238769.: 1.77020 0.334036 -0.0535029 0.813714 0.753702 0.221900 -0.295218 35 238769.: 1.77426 0.333148 -0.0574478 0.816047 0.757593 0.229748 -0.296632 36 238768.: 1.77320 0.333975 -0.0526670 0.821263 0.762394 0.235999 -0.298379 37 238767.: 1.77418 0.336466 -0.0563930 0.822759 0.765626 0.226975 -0.299748 38 238767.: 1.78199 0.339227 -0.0537562 0.817055 0.768450 0.227293 -0.300735 39 238767.: 1.78362 0.336112 -0.0574708 0.817615 0.775238 0.233808 -0.302166 40 238766.: 1.78234 0.335708 -0.0541233 0.824951 0.781352 0.230781 -0.304080 41 238766.: 1.78071 0.340580 -0.0582967 0.825871 0.789040 0.228050 -0.306496 42 238766.: 1.78564 0.342651 -0.0555063 0.820437 0.793591 0.233501 -0.307352 43 238765.: 1.78854 0.336362 -0.0575111 0.822236 0.800718 0.230453 -0.308676 44 238765.: 1.79035 0.338865 -0.0548413 0.823400 0.801282 0.230408 -0.309207 45 238765.: 1.79141 0.340229 -0.0579056 0.823829 0.801118 0.232874 -0.309268 46 238764.: 1.79260 0.341649 -0.0561844 0.825192 0.803986 0.232659 -0.310726 47 238764.: 1.79306 0.340896 -0.0579629 0.826080 0.806581 0.229985 -0.310932 48 238764.: 1.79511 0.341760 -0.0564367 0.826663 0.809794 0.230824 -0.310995 49 238764.: 1.79590 0.341943 -0.0583058 0.826392 0.811631 0.233579 -0.312857 50 238764.: 1.79735 0.342500 -0.0569191 0.826775 0.814454 0.231523 -0.314255 51 238764.: 1.79803 0.342385 -0.0585658 0.827588 0.817250 0.230351 -0.311884 52 238764.: 1.79879 0.342934 -0.0573229 0.828631 0.819879 0.232948 -0.313104 53 238763.: 1.79955 0.343024 -0.0588748 0.828600 0.819261 0.232585 -0.316996 54 238763.: 1.80107 0.343813 -0.0578012 0.828424 0.821877 0.230677 -0.314986 55 238763.: 1.80202 0.343795 -0.0593009 0.829245 0.824962 0.230673 -0.312679 56 238763.: 1.80200 0.343716 -0.0580599 0.829908 0.825870 0.231633 -0.316542 57 238763.: 1.80310 0.344165 -0.0596507 0.829856 0.828084 0.232078 -0.319643 58 238763.: 1.80406 0.344827 -0.0585127 0.829974 0.830967 0.232095 -0.316873 59 238763.: 1.80588 0.344977 -0.0599666 0.831440 0.833754 0.231478 -0.315165 60 238763.: 1.80580 0.344763 -0.0586460 0.831549 0.834478 0.229725 -0.318805 61 238763.: 1.80783 0.346005 -0.0601534 0.831956 0.837293 0.231288 -0.319255 62 238763.: 1.80830 0.346370 -0.0589037 0.831989 0.840659 0.232613 -0.317345 63 238763.: 1.80795 0.345260 -0.0593998 0.832862 0.844374 0.231451 -0.318415 64 238763.: 1.80921 0.346143 -0.0587947 0.831757 0.843370 0.229727 -0.321689 65 238763.: 1.81073 0.347191 -0.0600642 0.831852 0.845250 0.231729 -0.319219 66 238763.: 1.81114 0.347271 -0.0589651 0.834534 0.846723 0.233967 -0.317516 67 238763.: 1.81013 0.346093 -0.0597959 0.835512 0.849010 0.233050 -0.320437 68 238763.: 1.81060 0.346460 -0.0591706 0.834303 0.852860 0.231894 -0.319891 69 238763.: 1.81329 0.347411 -0.0604512 0.833342 0.850078 0.231477 -0.320083 70 238763.: 1.81387 0.347993 -0.0595348 0.833985 0.847139 0.232350 -0.322789 71 238763.: 1.81324 0.347899 -0.0599967 0.834136 0.851323 0.232037 -0.322152 72 238763.: 1.81379 0.347642 -0.0592948 0.834726 0.855137 0.231304 -0.320613 73 238762.: 1.81473 0.347048 -0.0598592 0.834876 0.854355 0.233145 -0.324226 74 238762.: 1.81543 0.348712 -0.0598769 0.835561 0.854799 0.232635 -0.324342 75 238762.: 1.81566 0.348474 -0.0605105 0.835728 0.854920 0.232540 -0.324366 76 238762.: 1.81581 0.348524 -0.0600888 0.835673 0.855497 0.232469 -0.324226 77 238762.: 1.81631 0.348419 -0.0603757 0.836006 0.855760 0.232277 -0.324290 78 238762.: 1.81638 0.348502 -0.0600820 0.835952 0.856440 0.232290 -0.324292 79 238762.: 1.81646 0.348500 -0.0603102 0.835957 0.857150 0.232294 -0.324326 80 238762.: 1.81651 0.348564 -0.0601051 0.835917 0.857866 0.232308 -0.324338 81 238762.: 1.81656 0.348554 -0.0603251 0.835939 0.858580 0.232271 -0.324338 82 238762.: 1.81658 0.348612 -0.0601244 0.835927 0.859298 0.232211 -0.324302 83 238762.: 1.81663 0.348605 -0.0603312 0.836009 0.859993 0.232071 -0.324210 84 238762.: 1.81669 0.348651 -0.0601486 0.836057 0.860709 0.232011 -0.324135 85 238762.: 1.81691 0.348617 -0.0603419 0.836138 0.861345 0.232164 -0.324343 86 238762.: 1.81720 0.348730 -0.0602298 0.836614 0.861310 0.231685 -0.324325 87 238762.: 1.81772 0.348875 -0.0605581 0.836859 0.861604 0.231599 -0.324432 88 238762.: 1.81780 0.348947 -0.0603126 0.836796 0.862278 0.231719 -0.324574 89 238762.: 1.81803 0.348981 -0.0604899 0.836871 0.862945 0.231751 -0.324726 90 238762.: 1.81804 0.349027 -0.0603379 0.836798 0.863657 0.231847 -0.324853 91 238762.: 1.81814 0.349039 -0.0604773 0.836816 0.864384 0.231872 -0.324932 92 238762.: 1.81813 0.349082 -0.0603512 0.836733 0.865115 0.231928 -0.324896 93 238762.: 1.81821 0.349082 -0.0604742 0.836740 0.865840 0.231902 -0.324773 94 238762.: 1.81816 0.349078 -0.0603719 0.836761 0.866509 0.231832 -0.325087 95 238762.: 1.81868 0.349105 -0.0605770 0.837166 0.866760 0.231656 -0.325126 96 238762.: 1.81898 0.349248 -0.0604113 0.837256 0.866900 0.231754 -0.324506 97 238762.: 1.81886 0.349276 -0.0604659 0.837183 0.867595 0.231842 -0.324726 98 238762.: 1.81908 0.349283 -0.0603947 0.837149 0.868175 0.231503 -0.324961 99 238762.: 1.81940 0.349351 -0.0605338 0.837337 0.868616 0.231555 -0.324506 100 238762.: 1.81935 0.349412 -0.0604821 0.837630 0.869112 0.231904 -0.324822 101 238762.: 1.81912 0.349394 -0.0605192 0.837525 0.869764 0.231736 -0.325040 102 238762.: 1.81929 0.349397 -0.0604783 0.837350 0.870470 0.231783 -0.325048 103 238762.: 1.81947 0.349473 -0.0604937 0.837541 0.871036 0.231410 -0.324868 104 238762.: 1.81964 0.349448 -0.0605820 0.837547 0.871246 0.231437 -0.325093 105 238762.: 1.81969 0.349463 -0.0605364 0.837551 0.871528 0.231452 -0.325310 user system elapsed 152.305 0.120 152.514 > fm5 Linear mixed-effects model fit by REML Formula: math ~ 0 + eth * sx + gr + cltype + (yrs | id) + (1 | tch) + (yrs | sch) Data: star AIC BIC logLik MLdeviance REMLdeviance 238810 239005 -119381 238837 238762 Random effects: Groups Name Variance Std.Dev. Corr id (Intercept) 1110.251 33.3204 yrs 45.040 6.7112 -0.301 tch (Intercept) 235.300 15.3395 sch (Intercept) 255.173 15.9741 yrs 44.986 6.7072 -0.775 Residual 335.323 18.3118 number of obs: 24578, groups: id, 10732; tch, 1374; sch, 80 Fixed effects: Estimate Std. Error t value ethW 561.5745 1.5756 356.4 ethB 538.8669 1.7827 302.3 ethA 567.3233 9.4628 60.0 ethH 560.7702 12.8106 43.8 ethI 538.1315 16.8329 32.0 ethO 555.9932 10.6230 52.3 sxF 2.4332 0.8590 2.8 gr.L 96.2170 1.9426 49.5 gr.Q -4.4522 0.8911 -5.0 gr.C -3.3736 0.8740 -3.9 cltypereg -8.0251 1.2378 -6.5 cltypereg+A -7.2303 1.2329 -5.9 ethB:sxF 1.0180 1.4298 0.7 ethA:sxF -5.4601 13.3145 -0.4 ethH:sxF 12.2620 19.4518 0.6 ethI:sxF -13.9290 27.6505 -0.5 ethO:sxF 22.6346 17.1674 1.3 Correlation of Fixed Effects: ethW ethB ethA ethH ethI ethO sxF gr.L gr.Q ethB 0.660 ethA 0.138 0.119 ethH 0.097 0.081 0.016 ethI 0.080 0.069 0.014 0.014 ethO 0.128 0.096 0.020 0.025 0.013 sxF -0.258 0.001 0.001 0.001 -0.001 0.003 gr.L -0.135 -0.124 -0.022 -0.017 -0.013 -0.019 0.000 gr.Q -0.007 -0.003 -0.002 0.000 0.002 0.000 -0.001 -0.007 gr.C -0.001 0.000 -0.001 0.000 -0.001 -0.001 0.000 0.001 0.001 cltypereg -0.382 -0.343 -0.063 -0.037 -0.039 -0.058 -0.001 0.026 0.035 cltypereg+A -0.384 -0.346 -0.060 -0.038 -0.037 -0.055 0.000 0.010 0.005 ethB:sxF 0.153 -0.247 0.001 0.000 0.001 -0.002 -0.601 0.001 0.000 ethA:sxF 0.017 0.002 -0.690 0.001 0.003 0.004 -0.065 0.000 0.001 ethH:sxF 0.018 0.001 0.001 -0.650 0.001 -0.004 -0.045 0.000 0.001 ethI:sxF 0.004 -0.003 -0.001 -0.004 -0.598 -0.002 -0.029 0.002 -0.002 ethO:sxF 0.014 0.006 0.000 -0.005 0.000 -0.608 -0.051 0.000 0.000 gr.C cltypr clty+A ethB:F ethA:F ethH:F ethI:F ethB ethA ethH ethI ethO sxF gr.L gr.Q gr.C cltypereg -0.020 cltypereg+A 0.002 0.523 ethB:sxF 0.000 0.003 0.004 ethA:sxF 0.000 0.000 -0.003 0.038 ethH:sxF -0.001 -0.008 -0.010 0.027 0.003 ethI:sxF 0.000 0.006 0.005 0.017 0.000 0.001 ethO:sxF 0.000 0.000 -0.007 0.031 0.000 0.004 0.002 > m5 Linear mixed-effects model fit by REML Formula: math ~ 0 + eth * sx + gr + cltype + (yrs | id) + (1 | tch) + (yrs | sch) Data: star AIC BIC logLik MLdeviance REMLdeviance 238810 239005 -119381 238837 238762 Random effects: Groups Name Variance Std.Dev. Corr id (Intercept) 1110.388 33.3225 yrs 45.022 6.7098 -0.301 tch (Intercept) 235.235 15.3374 sch (Intercept) 254.708 15.9596 yrs 44.919 6.7021 -0.775 Residual 335.335 18.3122 Number of obs: 24578, groups: id, 10732; tch, 1374; sch, 80 Fixed effects: Estimate Std. Error t value ethW 561.5743 1.5749 356.6 ethB 538.8667 1.7821 302.4 ethA 567.3238 9.4629 60.0 ethH 560.7696 12.8108 43.8 ethI 538.1308 16.8334 32.0 ethO 555.9931 10.6232 52.3 sxF 2.4331 0.8591 2.8 gr.L 96.2171 1.9414 49.6 gr.Q -4.4523 0.8910 -5.0 gr.C -3.3735 0.8739 -3.9 cltypereg -8.0247 1.2377 -6.5 cltypereg+A -7.2300 1.2328 -5.9 ethB:sxF 1.0181 1.4299 0.7 ethA:sxF -5.4598 13.3149 -0.4 ethH:sxF 12.2612 19.4524 0.6 ethI:sxF -13.9307 27.6517 -0.5 ethO:sxF 22.6367 17.1680 1.3 Correlation of Fixed Effects: ethW ethB ethA ethH ethI ethO sxF gr.L gr.Q ethB 0.659 ethA 0.138 0.119 ethH 0.097 0.081 0.016 ethI 0.080 0.069 0.014 0.014 ethO 0.128 0.096 0.020 0.025 0.013 sxF -0.258 0.001 0.001 0.001 -0.001 0.003 gr.L -0.135 -0.123 -0.022 -0.016 -0.013 -0.019 0.000 gr.Q -0.007 -0.003 -0.002 0.000 0.002 0.000 -0.001 -0.007 gr.C -0.001 0.000 -0.001 0.000 -0.001 -0.001 0.000 0.001 0.001 cltypereg -0.382 -0.343 -0.063 -0.037 -0.039 -0.058 -0.001 0.026 0.035 cltypereg+A -0.385 -0.346 -0.060 -0.038 -0.037 -0.055 0.000 0.010 0.005 ethB:sxF 0.153 -0.247 0.001 0.000 0.001 -0.002 -0.601 0.001 0.000 ethA:sxF 0.017 0.002 -0.690 0.001 0.003 0.004 -0.065 0.000 0.001 ethH:sxF 0.018 0.001 0.001 -0.650 0.001 -0.004 -0.045 0.000 0.001 ethI:sxF 0.004 -0.003 -0.001 -0.004 -0.598 -0.002 -0.029 0.002 -0.002 ethO:sxF 0.014 0.006 0.000 -0.005 0.000 -0.608 -0.051 0.000 0.000 gr.C cltypr clty+A ethB:F ethA:F ethH:F ethI:F ethB ethA ethH ethI ethO sxF gr.L gr.Q gr.C cltypereg -0.020 cltypereg+A 0.002 0.523 ethB:sxF 0.000 0.003 0.004 ethA:sxF 0.000 0.000 -0.003 0.038 ethH:sxF -0.001 -0.008 -0.010 0.027 0.003 ethI:sxF 0.000 0.006 0.005 0.017 0.000 0.001 ethO:sxF 0.000 0.000 -0.007 0.031 0.000 0.004 0.002 > dput(deviance(fm5)) 238762.389537803 > dput(unname(deviance(m5))) 238762.389580669 > ## The Cholesky decomposition is chosen to be simplicial. > ## A supernodal decomposition may be faster. > class(m5@L) [1] "dCHMsimpl" attr(,"package") [1] "Matrix" > object.size(fm5) [1] 25493280 > object.size(m5) [1] 16525464 > > ## Example that previously converged on the boundary and now gets interior convergence > data(Early, package = 'mlmRev') > Early$tos <- Early$age - 0.5 > system.time(fm6 <- lmer(cog ~ tos + tos:trt + (tos|id), Early, + control = list(niterEM = 0, + gradient = 0, msVerbose = 1))) 0 2396.03: 0.888889 0.761905 0.00000 1 2370.07: 1.09812 5.00000e-10 0.575267 2 2370.00: 1.24066 5.00000e-10 0.575267 3 2369.96: 1.18930 5.00000e-10 0.575267 4 2369.96: 1.18364 5.00000e-10 0.575267 user system elapsed 0.028 0.000 0.031 Warning message: Estimated variance-covariance for factor ‘id’ is singular in: `LMEoptimize<-`(`*tmp*`, value = list(maxIter = 200L, tolerance = 1.49011611938477e-08, > system.time(m6 <- lmer2(cog ~ tos + tos:trt + (tos|id), Early, + control = list(msVerbose = 1))) 0 2396.03: 0.942809 0.872872 0.00000 1 2381.52: 1.18350 0.00000 -0.409532 2 2370.20: 1.30925 8.71947e-06 -0.0417537 3 2364.95: 1.62372 0.00000 -0.268853 4 2364.63: 1.49445 0.0424744 -0.274359 5 2364.58: 1.47752 0.0659203 -0.234861 6 2364.50: 1.47693 0.0186081 -0.247417 7 2364.50: 1.48552 0.0136736 -0.250442 8 2364.50: 1.48296 0.00684420 -0.251619 user system elapsed 0.028 0.000 0.029 > fm6 Linear mixed-effects model fit by REML Formula: cog ~ tos + tos:trt + (tos | id) Data: Early AIC BIC logLik MLdeviance REMLdeviance 2382 2404 -1185 2377 2370 Random effects: Groups Name Variance Std.Dev. Corr id (Intercept) 9.2565e+01 9.62105695 tos 3.9102e-08 0.00019774 0.000 Residual 7.8204e+01 8.84327986 number of obs: 309, groups: id, 103 Fixed effects: Estimate Std. Error t value (Intercept) 120.783 1.634 73.91 tos -22.484 1.537 -14.63 tos:trtY 7.671 1.632 4.70 Correlation of Fixed Effects: (Intr) tos tos -0.605 tos:trtY 0.000 -0.598 > m6 Linear mixed-effects model fit by REML Formula: cog ~ tos + tos:trt + (tos | id) Data: Early AIC BIC logLik MLdeviance REMLdeviance 2377 2399 -1182 2371 2365 Random effects: Groups Name Variance Std.Dev. Corr id (Intercept) 166.261 12.8942 tos 10.530 3.2450 -1.000 Residual 75.601 8.6949 Number of obs: 309, groups: id, 103 Fixed effects: Estimate Std. Error t value (Intercept) 120.783 1.824 66.22 tos -22.472 1.494 -15.04 tos:trtY 7.648 1.446 5.29 Correlation of Fixed Effects: (Intr) tos tos -0.688 tos:trtY 0.000 -0.545 > dput(deviance(fm6)) 2369.95946596151 > dput(unname(deviance(m6))) 2364.50190112014 > > proc.time() user system elapsed 289.786 15.100 305.188 >