Re: [S] Change to NLME3 sooner rather than later?

Rene Holst (
Fri, 19 Jun 1998 13:47:02 +0200

Will it be possible to use NLME3, if say, the within-subject covariances
were known ?.


The North Sea Centre
P.O. Box 104
DK-9850 Hirtshals
Tel: +45 98 94 57 34
Fax: +45 98 94 48 33
-----Original Message-----
From: Bill Venables <>
To: <>
Cc: <>; <>
Date: Wednesday, June 17, 1998 12:02 PM
Subject: [S] Change to NLME3 sooner rather than later?

>In the latest number of JRSS(B) there is an interesting article:
> author = "Xiao-Li Meng and David van Dyk",
> title = "Fast EM-type Implementations for Mixed Effects Models",
> journal = "Journal of the Royal Statistical Society,
> Series B",
> year = 1998,
> volume = 60,
> pages = "559--578"
>where the authors present alternative fitting algorithms to the
>newton-type methods for linear mixed effects models used by
>lme(). In passing they found some simulation examples where
>lme() appeared not to give the correct ML solution. I approached
>the authors and asked for the details of the simulation examples,
>which they very promptly and helpfully supplied.
>As is often the case with simulation the examples are artificial
>and unlikely to be close to ones met practice, but nevertheless
>the authors do have a point. The data sets all consisted of 100
>clusters of size just 2. There were two covariates, Z1 and Z2,
>which had random coefficients with no fixed effect component, so
>the specification was
>fixed = Y ~ 1,
>random = ~Z1 + Z2 - 1,
>cluster = ~clust, # 100 levels each of size 2
>est.method = "ML"
>There are 10 data sets, all of this identical structure. Meng
>and van Dyk reported that in 5 both lme and their method found
>the same solution, but in the other 5 the lme solution had a
>lower likelihood and hence was incorrect.
>I have now repeated the calculations and I agree with their
>findings. The failure is not something inherent in algorithm,
>though, but a problem with the iteration governing mechanism.
>With some tweaking of control parameters it can be made to work.
>I thought I would also see how the recently released NLME3 (now
>on beta test, but available) version handled the same examples.
>The table below gives the (exactly comparable) maximum
>log-likelihood values achieved by the three implementations.
> ECME lme3 (new) lme2 (current)
> ------- ---------- --------
>Data set 1 -429.91 -429.91031 -429.9103
>Data set 2 -465.698 -465.69754 -465.698
>Data set 3 -494.153 -494.15305 -494.153
>Data set 4 -571.973 -571.9741 -571.973
>Data set 5 -614.353 -614.35355 -614.354
>Data set 6 -639.986 -639.98608 -656.28
>Data set 7 -674.744 -674.74439 -680.499
>Data set 8 -695.136 -695.13741 -696.912
>Data set 9 -712.727 -712.72657 -714.523
>Data set 10 -731.330 -731.32988 -732.077
>In other words the lme3 function agrees with ECME in all 10 cases
>(to iteration error), but lme2 stops iterating too early in 5 of
>the 10. Both the lme2 and lme3 results were got with the default
>settings of all control parameters and no tweaking.
>Details of the computational procedure used by lme3 are set out
>in a technical report: "Computational Methods for Multilevel
>Models" by D. M. Bates and J. C. Pinheiro and is available at
>My personal conclusions are as follows:
>1. There may be a problem with lme2 for very unusual models with
> a relatively low information base and flat likelihood. With
> such cases you may need to try re-setting the control
> parameters to see if it makes a difference, in particular to
> check for early termination of the iteration procedure.
>2. If you use lme (or nlme) quite a bit, the NLME3 version seems
> to be computationally more robust and there may be some
> unexpected bonuses in shifting to it sooner rather than later.
> (There are other good reasons to do so, anyway.)
>3. The ideas presented by Meng and van Dyk are very interesting
> and inventive and more comparisons would be valuable.
> Ultimately some hybrid or adaptive algorithm incorporating
> ideas from all sides may prove to be the most effective.
>In my view, though, lme2 is not seriously broken and I have seen
>no evidence of it giving misleading results in realistic cases.
>As with most statistical software, though, great care and some
>scepticism are needed.
>Finally I should say that I am offering these comments entirely
>on my own initiative as a fulltime user (and sometime expositor)
>of S-PLUS only. I trust they fairly represent the situation.
>Bill Venables.
>Bill Venables, Head, Dept of Statistics, Tel.: +61 8 8303 5418
>University of Adelaide, Fax.: +61 8 8303 3696
>South AUSTRALIA. 5005. Email:
>This message was distributed by To unsubscribe
>send e-mail to with the BODY of the
>message: unsubscribe s-news

This message was distributed by To unsubscribe
send e-mail to with the BODY of the
message: unsubscribe s-news