[R-sig-ME] Incorrect std errors from nlmer?
Russell Millar
r.millar at auckland.ac.nz
Tue Mar 31 23:47:42 CEST 2009
Thanks for that, but I do notice that the point estimates have now changed.
The laplace method (ADMB), quadrature (SAS), and simulated likelihood
(Millar, 2004, Aust&NZ J. Stat)
all produce the same ML point estimates (to at least 4 sig places) that
the current nlmer is finding.
Is the development version doing something different?
Regards,
Russell Millar
> On Tue, Mar 31, 2009 at 3:11 AM, <r.millar at auckland.ac.nz> wrote:
>
>> Hi All,
>>
>
>
>> I just copied and paste the example nlmer code from the lmer help file
>> (see below), which fits the logistic to the orange tree data.
>> The point estimates of the fixed effects look correct, but the s.e.'s
>> are not (I've fitted the model using three other software). The s.e. of
>> Asym is way out (it should be about 15), as is the tree effect variance
>> (should be about 1000)??????
>>
>
> You're right. I was kind of hoping that people wouldn't notice that :-)
>
> This is corrected in the development version, which uses a slightly
> different syntax in the model formula (all fixed-effects terms must be
> explicitly included). I won't have the development version ready for
> release soon so I should go back and fix that in the released version.
> Unfortunately, it will probably be a week before I can look at it.
> If someone can produce a patch I would greatly appreciate it.
>
> Here is what the development version produces.
>
>
>> (nm1 <- nlmer(circumference ~ SSlogis(age, Asym, xmid, scal) ~ Asym + xmid + scal + (Asym|Tree), Orange, start = c(Asym = 200, xmid = 725, scal = 350)))
>>
> Nonlinear mixed model fit by the Laplace approximation
> Formula: circumference ~ SSlogis(age, Asym, xmid, scal) ~ Asym + xmid
> + scal + (Asym | Tree)
> Data: Orange
> AIC BIC logLik deviance
> 273.2 280.9 -131.6 263.2
> Random effects:
> Groups Name Variance Std.Dev.
> Tree Asym 1000.911 31.637
> Residual 61.466 7.840
> Number of obs: 35, groups: Tree, 5
>
> Fixed effects:
> Estimate Std. Error t value
> Asym 191.06 15.51 12.32
> xmid 722.61 33.59 21.51
> scal 344.20 25.94 13.27
>
> Correlation of Fixed Effects:
> Asym xmid
> xmid 0.373
> scal 0.353 0.755
>
>
>
>> Regards,
>>
>> Russell Millar
>> U. Auckland
>>
>>
>>> (nm1 <- nlmer(circumference ~ SSlogis(age, Asym, xmid, scal) ~ Asym|Tree,
>>>
>> + Orange, start = c(Asym = 200, xmid = 725, scal = 350)))
>> Nonlinear mixed model fit by the Laplace approximation
>> Formula: circumference ~ SSlogis(age, Asym, xmid, scal) ~ Asym | Tree
>> Data: Orange
>> AIC BIC logLik deviance
>> 1901 1908 -945.3 1891
>> Random effects:
>> Groups Name Variance Std.Dev.
>> Tree Asym 53985.920 232.349
>> Residual 52.868 7.271
>> Number of obs: 35, groups: Tree, 5
>>
>> Fixed effects:
>> Estimate Std. Error t value
>> Asym 192.04 104.09 1.845
>> xmid 727.89 31.97 22.771
>> scal 347.97 24.42 14.252
>>
>> Correlation of Fixed Effects:
>> Asym xmid
>> xmid 0.053
>> scal 0.050 0.763
>>
>>
>>
>>> sessionInfo()
>>>
>> R version 2.8.1 (2008-12-22)
>> i386-pc-mingw32
>>
>> locale:
>> LC_COLLATE=English_New Zealand.1252;LC_CTYPE=English_New
>> Zealand.1252;LC_MONETARY=English_New
>> Zealand.1252;LC_NUMERIC=C;LC_TIME=English_New Zealand.1252
>>
>> attached base packages:
>> [1] stats graphics grDevices utils datasets methods base
>>
>> other attached packages:
>> [1] lme4_0.999375-28 Matrix_0.999375-22 lattice_0.17-20
>>
>> loaded via a namespace (and not attached):
>> [1] grid_2.8.1 tools_2.8.1
>>
>> _______________________________________________
>> 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