[R-sig-ME] lme4: constrain sigma to 0

Rolf Turner r.turner at auckland.ac.nz
Thu Feb 13 20:04:31 CET 2014

On 14/02/14 01:22, Viechtbauer Wolfgang (STAT) wrote:
> Is there a particular reason why you would want to fit this with
> lmer() as opposed to gls() from nlme? In your demo script:
> res <- gls(y ~ time, correlation = corSymm(form = ~ 1 | student),
> weights = varIdent(form = ~ 1 | time), data=dat.sim)
> will fit that model.

Well yes.  As I said in my write-up, the objective is really to be able 
to cross-check lmer() results with an alternative analysis that is 
available in a simple case, to verify (one hopes) that one has the 
lmer() syntax correct.

When I was actually faced with this problem, the data set and model that 
I wished to fit were actually much more complicated than the toy model 
that I discussed in my write-up.  The toy model was just a tentative 
step toward seeing if I could handle setting up the model for lmer() and 
understand/interpret the results correctly.  When the identifiability 
issue arose, I'm afraid that I basically gave up on lmer().


Rolf Turner

> ________________________________________
> From: r-sig-mixed-models-bounces at r-project.org [r-sig-mixed-models-bounces at r-project.org] On Behalf Of Rolf Turner [r.turner at auckland.ac.nz]
> Sent: Thursday, February 13, 2014 1:03 AM
> To: Vincent Dorie
> Cc: r-sig-mixed-models
> Subject: Re: [R-sig-ME] lme4: constrain sigma to 0
> Took me a while, but I have managed to write up some specifics of the
> problem that I had in mind.  The gremlins seem to have changed things
> since the last time I played around with this stuff, and what I am now
> getting differs from what I recollect.  However there is still a bit of
> a problem.
> I communicated with both Doug Bates and Ben Bolker on this issue, but
> cannot now for the life of me find any record of the emails that went
> back and forth.  And I keep ***everything***.  (Always the way;
> everything but what you want is available.)
> Anyhow --- I have attached what I hope is a clear write-up in pdf format
> and a script to demonstrate what goes on using simulated data.
> I hope these get through ...
> cheers,
> Rolf Turner
> On 12/02/14 12:48, Vincent Dorie wrote:
>> Any chance someone could write out the specifics of such a model? If I
> can wrap my head around it and its not too hard, I could try to throw it
> into blme.
>> On Feb 11, 2014, at 6:18 PM, Rolf Turner wrote:
>>> Several millennia ago I put in a feature-request that the facility for
>>> constraining sigma to 0 be added. So far, as far as I can tell, it
>>> hasn't been.
>>> Apparently it is (very) difficult to add such a constraint due to
>>> the way that lmer approaches the maximization of the likelihood.
>>> (This, rather than any intrinsic mathematical block to such a
>>> constraint.)
>>> I wanted to be able to fit a fairly simple repeated measures model
>>> with the covariance over time being an "arbitrary" n-x-n positive
>>> definite matrix (where "n" is the number of time points).  This
>>> can't be done using lmer() unless one can constrain the "overall"
>>> variance to be zero, otherwise the diagonal of the covariance
>>> matrix is un-identifiable.
>>> Since one cannot constrain sigma to be 0, one can't fit this model
>>> with lmer().  Bummer.

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