[R-sig-ME] A question about LME4

Viechtbauer Wolfgang (STAT) wolfgang.viechtbauer at maastrichtuniversity.nl
Wed Aug 12 13:55:10 CEST 2015

For ML estimation, lme4 (and nlme) uses what is equation (2) in Gurka (2006). For REML estimation, they both use what is equation (5), so the +1/2 ln|X'X| part is omitted.


Wolfgang Viechtbauer, Ph.D., Statistician | Department of Psychiatry and
Neuropsychology | Maastricht University | P.O. Box 616 (VIJV1) | 6200 MD
Maastricht, The Netherlands | +31 (43) 388-4170 | http://www.wvbauer.com
From: R-sig-mixed-models [r-sig-mixed-models-bounces at r-project.org] On Behalf Of Subhash.Chandra at ecodev.vic.gov.au [Subhash.Chandra at ecodev.vic.gov.au]
Sent: Wednesday, August 12, 2015 1:56 AM
To: Steve Walker
Cc: r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] A question about LME4

Thanks everyone for their advice. Looks like I did not phrase my question
correctly. My apologies to waste your time. First, to clarify what Douglas
wrote, I was not questioning the correctness of your approach. The
question that I intended to really ask is:

Does LME4 use the complete log residual likelihood in Gurka's equation
(4)? If not, what does it omit from equation (4), for example, equation
(5) in Gurka's paper that SAS uses by omitting a constant? As regards the
log likelihood, I assume (hopefully correctly) that LME4 uses the exact
equivalent of what appears in equation (2) of Gurka's paper.

Hope someone could help clarify these points. Sorry if this looks like a
silly question to ask.

From:   Steve Walker <steve.walker at utoronto.ca>
To:     Douglas Bates <bates at stat.wisc.edu>,
Subhash.Chandra at ecodev.vic.gov.au, r-sig-mixed-models at r-project.org,
Date:   12/08/2015 03:05 AM
Subject:        Re: [R-sig-ME] A question about LME4

On 2015-08-11 11:37 AM, Douglas Bates wrote:
> As Ben mentioned in his off-list reply to you, the paper
> http://arxiv.org/abs/1406.5823 describes in some detail the
> methods that are used in lme4.

This arxiv paper (in press at JSS) is pretty long, although hopefully
comprehensive.  To help pinpoint things a bit check out equations 34 and
41.  These give the ML and REML criteria (on the deviance scale) that
are used within lmer.

> The fact that they don't correspond to
> those in the 2006 paper by Gurka in The American Statistician is not an
> oversight.  They are quite superior to any methods based on the
> in that paper, as they should be.  We have spent the last 20 years or so
> developing them.

To expand on these remarks a bit, both the fixed effects coefficient
vector and residual variance parameter are profiled out, which makes
computations more efficient.  Also, correlations among random effects
are partly accounted for in these equations using the log determinant of
a sparse Cholesky factor, which is very efficiently updated over
iterations of the nonlinear optimizer.


> On Tue, Aug 11, 2015 at 10:31 AM <Subhash.Chandra at ecodev.vic.gov.au>
>> Appreciate your help and advice on (hopefully a simple) question. This
>> relates to the mathematical expressions that LME4 uses to estimate log
>> likelihood under maximum likelihood (ML) and under residual maximum
>> likelihood (ReML) for fitting linear mixed models (LMM). What I am
>> 'exactly' looking for is mathematical expressions for log likelihood in
>> the form of expressions (2), (4) and (5) in the attached paper by Gurka
>> (2006).
>> I have gone through the LME4 documentation
>> https://cran.r-project.org/web/packages/lme4/vignettes/lmer.pdf
>> https://cran.r-project.org/web/packages/lme4/vignettes/Theory.pdf
>> I must admit I am unable to figure out the answer to my question.
>> Regards,
>> Subhash
>> Dr Subhash Chandra | Chief Biometrician
>> Agriculture Research & Development Division
>> Department of Economic Development, Jobs, Transport & Resources
>> 255 Ferguson Road, Tatura 3616, Victoria, Australia
>> T:  03 5833 5397 | M: 0427 277 560 | E: Subhash.Chandra at ecodev.vic.gov.au

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