[R-sig-ME] lme4/nlmer problem

Douglas Bates bates at stat.wisc.edu
Fri Aug 17 14:40:02 CEST 2007


A call to nlmer looks different from a call to nlme.  The formula
argument should be a three-part formula of the form

response ~ nonlinear_model ~ mixed-model_formula

Some examples are shown below.  I am "near" release of the development
version of the lme4 package that includes nlmer.  I still need to
debug the version of glmer in this release.  We will need to arrange
for a transition period so users can take previously fit lmer objects
and convert them to the new form.  The source package for the
development version can be created from the sources in the SVN archive

https://svn.r-project.org/R-packages/branches/gappy-lmer/

I don't use Windows and do not have a Windows package for
installation.  i can create one using Uwe's win-builder.R-project.org
if it is urgent.  Otherwise I would suggest waiting until we transfer
the project to R-forge.R-project.org where the development version
will be build and tested every night.


On 8/17/07, Kalle Eerikäinen <kalle.eerikainen at metla.fi> wrote:
> Hi Markus,
>
> Many thanks for your message. Unfortunately, it makes no change whether
> or not the argument "fixed=p0+p1~1" is included into the model formula.
>
> Kalle
>
> Markus Jäntti wrote:
> > Kalle Eerikäinen wrote:
> >> Hello,
> >>
> >> I have done some test estimations using the lme4 package of R. The
> >> estimation of the parameters of linear mixed-effect models using the
> >> 'lmer' goes well. For instance, a very simple single-level mixed model
> >> "Naslund_lmer1  <- lmer(y ~ d13 + (1 |stand), data = height1)" for the
> >> relationship between the tree height (or its transformation) and
> >> diameter comes out perfectly.
> >>
> >> However, if I attempt to estimate nonlinear mixed-effect models, I
> >> always receive an error message that tells me: "Error:
> >> length(start$fixed) is not TRUE". This is also the case with the
> >> following model:
> >>
> >> Schumacher_nlmer1 <- lme4:::nlmer(ht   ~ exp(p0 + p1*1/d13)+u0 ~
> >> (u0|stand) , fixed=p0+p1~1, data = height1, start = c(p0 = 0.1, p1 =
> >> -9.0), verb = 1)
> >
> > What is the purpose of the argument "fixed=p0+p1~1"? The help page makes
> > no mention of it. Maybe this is what is generating the error message.
> >
> > markus
> >>
> >
> >
> >> It is obvious that there exists a trivial bug/mistake in my code, but
> >> I cannot see what is wrong with it. Could someone give me a helping
> >> hand with my 'nlmer problem'?
> >>
> >> Regards,
> >>
> >> Kalle Eerikäinen

> example(lmer)

lmer> (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy))
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       612.095  24.7405
                35.071   5.9221  0.065
 Residual      654.944  25.5919
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.546    6.77

Correlation of Fixed Effects:
     (Intr)
Days -0.138

lmer> (fm2 <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject),
sleepstudy))
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       627.577  25.0515
 Subject        35.852   5.9876
 Residual      653.594  25.5655
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.559    6.71

Correlation of Fixed Effects:
     (Intr)
Days -0.184

lmer> anova(fm1, fm2)
Data: sleepstudy
Models:
fm2: Reaction ~ Days + (1 | Subject) + (0 + Days | Subject)
fm1: Reaction ~ Days + (Days | Subject)
      Df     AIC     BIC  logLik  Chisq Chi Df Pr(>Chisq)
fm2.p  4 1760.05 1772.82 -876.02
fm1.p  5 1761.99 1777.95 -875.99 0.0609      1      0.805

lmer> (nm1 <- nlmer(circumference ~ SSlogis(age, Asym, xmid, scal) ~ Asym|Tree,
lmer+               Orange, verb = 1, start = c(Asym = 200, xmid =
725, scal = 350)))
  0:     299.40520: 0.617213  200.000  725.000  350.000
  1:     273.38196:  1.61716  199.990  725.001  350.001
  2:     268.17768:  2.12832  199.806  725.025  349.991
  3:     265.29713:  2.68723  199.487  725.077  349.967
  4:     264.04456:  3.19444  199.108  725.150  349.930
  5:     263.54365:  3.63803  198.706  725.240  349.882
  6:     263.39702:  3.95389  198.355  725.330  349.831
  7:     263.36716:  4.12286  198.105  725.403  349.787
  8:     263.35927:  4.19219  197.935  725.460  349.750
  9:     263.34864:  4.25604  197.657  725.563  349.684
 10:     263.32421:  4.34084  196.975  725.830  349.511
 11:     263.27812:  4.41246  195.592  726.386  349.148
 12:     263.21385:  4.39497  193.467  727.261  348.574
 13:     263.16418:  4.24055  191.721  728.004  348.085
 14:     263.14648:  4.07901  191.496  728.122  348.004
 15:     263.14386:  4.03244  191.929  727.953  348.114
 16:     263.14379:  4.03495  192.037  727.908  348.143
 17:     263.14379:  4.03500  192.037  727.909  348.142
 18:     263.14378:  4.03507  192.039  727.912  348.137
 19:     263.14377:  4.03516  192.058  727.934  348.092
 20:     263.14377:  4.03509  192.059  727.934  348.092
Nonlinear mixed model fit by Laplace
Formula: circumference ~ SSlogis(age, Asym, xmid, scal) ~ Asym | Tree
   Data: Orange
Random effects:
 Groups   Name Variance Std.Dev.
 Tree          1095.44  33.0975
 Residual        67.28   8.2024
Number of obs: 35, groups: Tree, 5

Fixed effects:
    Asym     xmid     scal
192.0589 727.9341 348.0919

lmer> (nm2 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~
(lKe+lKa+lCl|Subject),
lmer+               Theoph, start = c(lKe = -2.5, lKa = 0.5, lCl =
-3), verbose = 1))
  0:     386.09968: 0.492366 0.492366 0.492366  0.00000  0.00000
0.00000 -2.50000 0.500000 -3.00000
  1:     384.88844: 0.492038 0.492958 0.492286 -0.00561125 -0.00334076
-0.00230366 -2.49991 0.499929 -3.00040
  2:     381.72748: 0.491706 0.493621 0.492187 -0.0103177 0.00147481
-0.00387406 -2.49971 0.499862 -3.00083
  3:     378.94261: 0.491251 0.494615 0.492040 -0.0166021 -0.00115673
-0.00448798 -2.49934 0.499774 -3.00149
  4:     377.39285: 0.490840 0.495891 0.491841 -0.0230831 0.000679450
-0.00400797 -2.49870 0.499687 -3.00236
  5:     375.74378: 0.490427 0.498498 0.491398 -0.0284192 -0.000543731
-0.00618135 -2.49679 0.499589 -3.00411
  6:     375.28979: 0.490375 0.499569 0.491218 -0.0301946 -0.000209774
-0.00465660 -2.49587 0.499576 -3.00483
  7:     374.93047: 0.490232 0.500576 0.491053 -0.0318322 -0.000446596
-0.00650892 -2.49521 0.499528 -3.00552
  8:     374.87512: 0.490216 0.500699 0.491032 -0.0320955 -3.46514e-05
-0.00643436 -2.49512 0.499524 -3.00561
  9:     374.80736: 0.490203 0.500903 0.490997 -0.0323720 -0.000371694
-0.00640277 -2.49497 0.499519 -3.00575
 10:     374.68230: 0.490180 0.501525 0.490889 -0.0327856 -5.04549e-05
-0.00657813 -2.49451 0.499506 -3.00618
 11:     373.33408: 0.489949 0.513472 0.488761 -0.0368005 -0.000495062
-0.0110244 -2.48566 0.499303 -3.01444
 12:     371.55810: 0.489649 0.526067 0.486246 -0.0398701 0.000796899
-0.00972192 -2.47684 0.499174 -3.02308
 13:     370.08650: 0.489135 0.538835 0.483436 -0.0416520 -0.000892153
-0.00945036 -2.46818 0.499034 -3.03190
 14:     368.56980: 0.488093 0.551720 0.479905 -0.0412694 0.000129599
-0.00929399 -2.46002 0.498898 -3.04099
 15:     361.51477: 0.475950 0.684052 0.429743 -0.0257205 -0.00194058
-0.00365960 -2.39601 0.496206 -3.13671
 16:     361.16262: 0.461171 0.807883 0.337864 -0.0637066 0.00266451
-0.00944405 -2.39669 0.488808 -3.22711
 17:     354.97662: 0.430456 0.861847 0.284795 -0.0586136 -0.000373538
-0.0251852 -2.43362 0.492158 -3.23712
 18:     352.94931: 0.391715 0.930566 0.270056 -0.0586716 0.00268354
-0.0188094 -2.47603 0.488436 -3.22586
 19:     352.50958: 0.391680 0.930588 0.270078 -0.0590697 -0.00104861
-0.0177875 -2.47592 0.488454 -3.22589
 20:     351.81346: 0.389032 0.929977 0.270567 -0.0593194 0.000716624
-0.0177630 -2.47413 0.489169 -3.22510
 21:     351.77196: 0.386876 0.929332 0.270890 -0.0599408 0.000422051
-0.0172655 -2.47144 0.490263 -3.22421
 22:     351.70183: 0.384614 0.928486 0.271183 -0.0602270 0.000947320
-0.0176223 -2.46906 0.491483 -3.22294
 23:     351.64354: 0.381907 0.927674 0.271615 -0.0605585 0.000612578
-0.0177979 -2.46695 0.492636 -3.22198
 24:     351.45295: 0.361792 0.920922 0.274368 -0.0626416 0.000948215
-0.0184277 -2.45587 0.500714 -3.22173
 25:     351.41920: 0.340043 0.925736 0.263511 -0.0627954 0.000382087
-0.0181634 -2.45748 0.499773 -3.22745
 26:     351.36176: 0.319527 0.936642 0.272866 -0.0634084 0.000640883
-0.0181702 -2.45989 0.496879 -3.22451
 27:     351.35763: 0.319522 0.936663 0.272862 -0.0633127 0.000811601
-0.0181654 -2.45982 0.496886 -3.22453
 28:     351.35398: 0.319514 0.936695 0.272856 -0.0631903 0.000687667
-0.0181293 -2.45972 0.496897 -3.22457
 29:     351.34976: 0.319278 0.936827 0.272741 -0.0630328 0.000846531
-0.0181026 -2.45954 0.496867 -3.22447
 30:     351.34465: 0.318678 0.937095 0.272459 -0.0629431 0.000681116
-0.0180636 -2.45934 0.496770 -3.22413
 31:     351.33832: 0.317346 0.937578 0.271910 -0.0627742 0.000842182
-0.0180250 -2.45900 0.496565 -3.22354
 32:     351.32914: 0.314176 0.938064 0.271044 -0.0625923 0.000668059
-0.0179401 -2.45882 0.496133 -3.22318
 33:     351.29439: 0.285503 0.934514 0.269028 -0.0604029 0.000717185
-0.0171005 -2.46262 0.493595 -3.23365
 34:     351.22704: 0.255183 0.937197 0.263394 -0.0572005 9.67627e-05
-0.0158327 -2.46159 0.491972 -3.23286
 35:     351.17757: 0.224719 0.940024 0.257824 -0.0554810 0.000966560
-0.0153756 -2.46183 0.490199 -3.23206
 36:     351.15197: 0.194079 0.944209 0.255029 -0.0535618 0.000374553
-0.0146192 -2.46285 0.492320 -3.23134
 37:     351.11990: 0.220162 0.951637 0.269429 -0.0533941 0.000422727
-0.0150733 -2.46169 0.497667 -3.22999
 38:     351.07908: 0.237936 0.970464 0.270589 -0.0549069 0.000977890
-0.0156717 -2.45577 0.481794 -3.22638
 39:     351.04280: 0.252398 0.986541 0.268059 -0.0566637 0.000413897
-0.0162241 -2.45778 0.503965 -3.22759
 40:     351.03651: 0.250609 0.985292 0.268665 -0.0555838 0.000793777
-0.0154951 -2.45641 0.509033 -3.22700
 41:     351.02001: 0.249118 0.983275 0.269207 -0.0547708 0.000399987
-0.0155318 -2.45505 0.504024 -3.22628
 42:     351.01884: 0.246330 0.987848 0.268166 -0.0540239 0.000759755
-0.0159234 -2.45462 0.502039 -3.22590
 43:     351.00355: 0.245350 0.987979 0.268552 -0.0539114 0.000430733
-0.0155863 -2.45398 0.499423 -3.22558
 44:     351.00194: 0.243729 0.989303 0.269419 -0.0536648 0.000630739
-0.0151864 -2.45254 0.494226 -3.22494
 45:     350.99261: 0.243157 0.994940 0.269152 -0.0540473 0.000474664
-0.0153853 -2.45275 0.495783 -3.22509
 46:     350.97638: 0.251550  1.01754 0.268227 -0.0538946 0.000480603
-0.0154727 -2.45108 0.504181 -3.22516
 47:     350.97018: 0.248046  1.02234 0.269093 -0.0529578 0.000372733
-0.0154663 -2.44907 0.496315 -3.22439
 48:     350.96949: 0.244190  1.02531 0.269006 -0.0531794 0.000428105
-0.0154698 -2.44957 0.496147 -3.22475
 49:     350.96929: 0.248611  1.02686 0.270018 -0.0535457 0.000415639
-0.0155669 -2.44946 0.495945 -3.22572
 50:     350.96917: 0.246859  1.02631 0.269920 -0.0532843 0.000400073
-0.0154960 -2.44968 0.496594 -3.22596
 51:     350.96912: 0.245792  1.02604 0.269656 -0.0532195 0.000403823
-0.0154806 -2.44961 0.496563 -3.22551
 52:     350.96912: 0.245999  1.02613 0.269687 -0.0532265 0.000403255
-0.0154822 -2.44965 0.496527 -3.22560
 53:     350.96912: 0.246003  1.02610 0.269697 -0.0532315 0.000403090
-0.0154834 -2.44963 0.496558 -3.22560
 54:     350.96912: 0.245997  1.02611 0.269692 -0.0532292 0.000403164
-0.0154828 -2.44964 0.496546 -3.22560
 55:     350.96912: 0.245997  1.02611 0.269692 -0.0532292 0.000403165
-0.0154828 -2.44964 0.496546 -3.22560
Nonlinear mixed model fit by Laplace
Formula: conc ~ SSfol(Dose, Time, lKe, lKa, lCl) ~ (lKe + lKa + lCl |
    Subject)
   Data: Theoph
Random effects:
 Groups   Name Variance Std.Dev. Corr
 Subject       0.029956 0.17308
               0.521301 0.72201  -0.013
               0.036130 0.19008   0.000 -0.059
 Residual      0.495029 0.70358
Number of obs: 132, groups: Subject, 12

Fixed effects:
       lKe        lKa        lCl
-2.4496370  0.4965462 -3.2256163

lmer> (nm3 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~
lmer+               (lKe|Subject) + (lKa|Subject) + (lCl|Subject), Theoph,
lmer+               start = c(lKe = -2.5, lKa = 0.5, lCl = -3), verbose = 1))
  0:     386.09968: 0.492366 0.492366 0.492366 -2.50000 0.500000 -3.00000
  1:     377.43545: 0.0825471  1.23161 0.393063 -2.38231 0.411355 -3.50398
  2:     366.00277: 0.112039  1.21790 0.461466 -2.57362 0.412740 -3.33669
  3:     360.02522: 0.162062  1.15605 0.375272 -2.39847 0.435753 -3.17745
  4:     357.53543: 0.133920  1.14625 0.328917 -2.46420 0.437507 -3.19196
  5:     355.97764: 0.0867116  1.13276 0.279073 -2.43653 0.442893 -3.23534
  6:     355.27369: 0.0718404  1.12642 0.264747 -2.46936 0.444271 -3.21897
  7:     354.97499: 0.0464245  1.11570 0.247811 -2.44891 0.448129 -3.23724
  8:     354.69747: 0.0300521  1.10541 0.245427 -2.47167 0.450630 -3.22029
  9:     354.44380: 0.0113476  1.08241 0.247659 -2.45877 0.456802 -3.23041
 10:     354.30407: 0.0106401  1.05289 0.234811 -2.46665 0.463454 -3.22351
 11:     354.17495: 0.0111025  1.02220 0.243825 -2.46532 0.469804 -3.23472
 12:     354.07980: 0.00619672 0.990430 0.238104 -2.46637 0.474160 -3.22448
 13:     354.06447: 0.00476224 0.987768 0.238322 -2.46122 0.474818 -3.23062
 14:     354.04416: 0.00549549 0.981257 0.239218 -2.46669 0.475108 -3.23036
 15:     354.03247: 0.00462216 0.974265 0.236284 -2.46289 0.476168 -3.23060
 16:     354.00978: 0.00332796 0.958014 0.239023 -2.46434 0.476629 -3.22613
 17:     354.00268: 0.00263076 0.953403 0.238980 -2.46373 0.477606 -3.23179
 18:     353.99869: 0.00561923 0.948876 0.236087 -2.46739 0.479069 -3.23041
 19:     353.99299:  0.00000 0.947792 0.238852 -2.46573 0.480566 -3.23083
 20:     353.99084:  0.00000 0.946198 0.236413 -2.46555 0.480836 -3.23022
 21:     353.98958: 2.84393e-11 0.943787 0.237974 -2.46491 0.481186 -3.23065
 22:     353.98840: 0.000535840 0.941514 0.237039 -2.46633 0.481093 -3.22986
 23:     353.98700: 0.00173219 0.939219 0.236789 -2.46529 0.480775 -3.23087
 24:     353.98595: 0.00110715 0.936591 0.237723 -2.46594 0.480285 -3.23052
 25:     353.98506: 0.00112750 0.935243 0.236653 -2.46543 0.482676 -3.23039
 26:     353.98465:  0.00000 0.933278 0.237169 -2.46590 0.481052 -3.23009
 27:     353.98452:  0.00000 0.931806 0.236825 -2.46509 0.479685 -3.23084
 28:     353.98407: 0.000981068 0.930591 0.236833 -2.46573 0.481267 -3.23069
 29:     353.98390: 0.000380416 0.930199 0.236642 -2.46544 0.481447 -3.23018
 30:     353.98386: 0.000194769 0.929921 0.236808 -2.46537 0.481545 -3.23043
 31:     353.98381: 8.11621e-05 0.929672 0.236742 -2.46558 0.481823 -3.23030
 32:     353.98378: 0.000138324 0.929240 0.236665 -2.46546 0.481748 -3.23036
 33:     353.98375: 0.000130336 0.928850 0.236742 -2.46551 0.481972 -3.23027
 34:     353.98373:  0.00000 0.928494 0.236666 -2.46553 0.481790 -3.23040
 35:     353.98372: 1.53639e-05 0.928261 0.236665 -2.46551 0.482194 -3.23037
 36:     353.98372: 1.18744e-05 0.928223 0.236687 -2.46554 0.482191 -3.23034
 37:     353.98372: 8.34650e-06 0.928177 0.236693 -2.46551 0.482190 -3.23036
 38:     353.98371: 2.79048e-05 0.928069 0.236682 -2.46553 0.482143 -3.23033
 39:     353.98371: 6.40584e-05 0.927846 0.236665 -2.46549 0.482045 -3.23034
 40:     353.98371:  0.00000 0.927624 0.236703 -2.46553 0.482091 -3.23035
 41:     353.98371:  0.00000 0.927553 0.236661 -2.46554 0.482132 -3.23036
 42:     353.98371: 5.96124e-06 0.927462 0.236670 -2.46552 0.482124 -3.23035
 43:     353.98371: 5.96124e-06 0.927462 0.236670 -2.46552 0.482124 -3.23035
Nonlinear mixed model fit by Laplace
Formula: conc ~ SSfol(Dose, Time, lKe, lKa, lCl) ~ (lKe | Subject) +
(lKa |      Subject) + (lCl | Subject)
   Data: Theoph
Random effects:
 Groups   Name Variance Std.Dev.
 Subject       0.000000 0.00000
 Subject       0.440903 0.66401
 Subject       0.028714 0.16945
 Residual      0.512588 0.71595
Number of obs: 132, groups: Subject, 12; Subject, 12; Subject, 12

Fixed effects:
       lKe        lKa        lCl
-2.4655320  0.4821415 -3.2303559

lmer> (nm4 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~ (lKa+lCl|Subject),
lmer+               Theoph, start = c(lKe = -2.5, lKa = 0.5, lCl =
-3), verbose = 1))
  0:     377.00821: 0.492366 0.492366  0.00000 -2.50000 0.500000 -3.00000
  1:     375.06636: 0.496628 0.491116 0.115284 -2.49669 0.499833 -3.00310
  2:     368.73772: 0.418871 0.467676 0.109343 -2.35636 0.496774 -3.12849
  3:     360.04981: 0.402170 0.453340 0.0643095 -2.39295 0.495044 -3.13138
  4:     358.31247: 0.398371 0.448441 0.0509030 -2.40073 0.494430 -3.13321
  5:     357.53116: 0.391620 0.435052 0.0276480 -2.41896 0.492729 -3.13855
  6:     355.71678: 0.387375 0.415764 0.0480068 -2.42360 0.490169 -3.15578
  7:     351.92166: 0.324845 0.256277 0.0457815 -2.43077 0.474642 -3.28062
  8:     350.29390: 0.325207 0.256363 0.0582163 -2.45170 0.473363 -3.26257
  9:     349.96730: 0.317341 0.252784 0.0418845 -2.46832 0.472434 -3.24521
 10:     349.38606: 0.308708 0.235571 0.0592500 -2.46265 0.472845 -3.23054
 11:     349.18344: 0.278968 0.238355 0.0619188 -2.46058 0.473807 -3.22663
 12:     349.13588: 0.256679 0.253837 0.0727460 -2.46387 0.474327 -3.23405
 13:     348.96171: 0.233013 0.237400 0.0771499 -2.46412 0.474256 -3.22567
 14:     348.75767: 0.185282 0.237304 0.112341 -2.45487 0.480483 -3.21946
 15:     348.75117: 0.175838 0.237215 0.108856 -2.45946 0.477093 -3.22310
 16:     348.69939: 0.176307 0.237053 0.116914 -2.45842 0.468137 -3.22395
 17:     348.67673: 0.167417 0.237420 0.120847 -2.45913 0.475105 -3.22583
 18:     348.66522: 0.151724 0.238434 0.137320 -2.45369 0.474436 -3.21949
 19:     348.64376: 0.153956 0.236286 0.141555 -2.45956 0.473758 -3.22274
 20:     348.62932: 0.148758 0.236232 0.140890 -2.45963 0.467458 -3.22516
 21:     348.62094: 0.149100 0.236064 0.142779 -2.45980 0.475667 -3.22653
 22:     348.61541: 0.145964 0.235440 0.148000 -2.46327 0.470978 -3.22776
 23:     348.61273: 0.139750 0.235058 0.150849 -2.46421 0.475931 -3.22862
 24:     348.60077: 0.136844 0.235397 0.157547 -2.46107 0.473210 -3.23013
 25:     348.59434: 0.133357 0.233908 0.164716 -2.46229 0.474504 -3.22811
 26:     348.58838: 0.128060 0.234947 0.171218 -2.46270 0.473326 -3.22830
 27:     348.58516: 0.123314 0.235122 0.178312 -2.46234 0.473393 -3.22836
 28:     348.58388: 0.119894 0.237515 0.185676 -2.46285 0.472785 -3.22922
 29:     348.58175: 0.115664 0.235953 0.192852 -2.46184 0.472936 -3.22882
 30:     348.58112: 0.116375 0.235245 0.192781 -2.46174 0.473003 -3.22860
 31:     348.58089: 0.114832 0.235288 0.195777 -2.46201 0.472733 -3.22865
 32:     348.58084: 0.113840 0.235423 0.197880 -2.46202 0.472782 -3.22866
 33:     348.58084: 0.113738 0.235410 0.198166 -2.46201 0.472733 -3.22867
 34:     348.58084: 0.113718 0.235407 0.198209 -2.46200 0.472738 -3.22867
Nonlinear mixed model fit by Laplace
Formula: conc ~ SSfol(Dose, Time, lKe, lKa, lCl) ~ (lKa + lCl | Subject)
   Data: Theoph
Random effects:
 Groups   Name Variance Std.Dev. Corr
 Subject       0.006640 0.081486
               0.028715 0.169455 0.095
 Residual      0.513461 0.716562
Number of obs: 132, groups: Subject, 12

Fixed effects:
       lKe        lKa        lCl
-2.4620040  0.4727376 -3.2286810

lmer> (nm5 <- nlmer(conc ~ SSfol(Dose, Time,lKe, lKa, lCl) ~
(lKa|Subject) + (lCl|Subject),
lmer+               Theoph, start = c(lKe = -2.5, lKa = 0.5, lCl =
-3), verbose = 1))
  0:     377.00821: 0.492366 0.492366 -2.50000 0.500000 -3.00000
  1:     366.76107: 0.651153 0.445802 -2.37680 0.493764 -3.11563
  2:     365.36949: 0.727845 0.339343 -2.56858 0.470938 -3.15375
  3:     357.95634: 0.800556 0.235553 -2.43727 0.469676 -3.30431
  4:     354.99052: 0.832260 0.259765 -2.48344 0.471084 -3.20395
  5:     354.24411: 0.870423 0.236936 -2.44799 0.476074 -3.20614
  6:     354.17301: 0.882142 0.234273 -2.47983 0.474481 -3.25200
  7:     354.01600: 0.931094 0.245475 -2.46839 0.482925 -3.22876
  8:     353.98864: 0.931074 0.239664 -2.46436 0.483016 -3.23136
  9:     353.98458: 0.930993 0.237968 -2.46595 0.482944 -3.23014
 10:     353.98400: 0.930867 0.237118 -2.46538 0.482925 -3.23051
 11:     353.98394: 0.930160 0.236646 -2.46583 0.482637 -3.23007
 12:     353.98374: 0.929216 0.236720 -2.46550 0.482309 -3.23037
 13:     353.98370: 0.928140 0.236724 -2.46568 0.482320 -3.23030
 14:     353.98368: 0.927745 0.236701 -2.46539 0.482224 -3.23029
 15:     353.98368: 0.927700 0.236705 -2.46552 0.481755 -3.23040
 16:     353.98368: 0.927689 0.236686 -2.46554 0.481775 -3.23036
 17:     353.98368: 0.927672 0.236679 -2.46551 0.481820 -3.23037
 18:     353.98367: 0.927645 0.236677 -2.46555 0.481928 -3.23037
 19:     353.98367: 0.927612 0.236678 -2.46553 0.482015 -3.23039
 20:     353.98367: 0.927527 0.236683 -2.46551 0.482012 -3.23035
 21:     353.98367: 0.927478 0.236679 -2.46554 0.482090 -3.23035
 22:     353.98367: 0.927453 0.236672 -2.46553 0.482134 -3.23035
 23:     353.98367: 0.927456 0.236674 -2.46553 0.482133 -3.23035
Nonlinear mixed model fit by Laplace
Formula: conc ~ SSfol(Dose, Time, lKe, lKa, lCl) ~ (lKa | Subject) +
(lCl |      Subject)
   Data: Theoph
Random effects:
 Groups   Name Variance Std.Dev.
 Subject       0.440915 0.66401
 Subject       0.028712 0.16945
 Residual      0.512588 0.71595
Number of obs: 132, groups: Subject, 12; Subject, 12

Fixed effects:
       lKe        lKa        lCl
-2.4655280  0.4821327 -3.2303658




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