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

Vincent Dorie vjd4 at nyu.edu
Thu Feb 13 21:05:37 CET 2014


Thanks for the writeup, it helped a lot.

I guess I can see why this hasn't been added to lmer, since it doesn't really exploit the sparse matrix decomposition machinery lmer uses. From a nuts and bolts perspective, it would probably make more sense to pass off resid.var = 0 calls to nlme or anything that does generalized least squares.

Here's a followup question for anyone that would like to fit a zero residual variance model, but is it reasonable to say that this is equivalent to wanting to apply the covariance structure from the random effects to the observations instead? One hurdle that I can see is that the model only makes sense if you only have a single grouping factor that induces a random effect for every observation. Enforcing that could cause some frustration when trying to specify the model.

An alternative that might be to include a separate argument to lmer that lets you specify residual error structure. In this case, that would highlight that this is an lm, not an lmm. However, there doesn't seem to be anything in principle that prevents you from doing a proper mixed effects model in this fashion, so long as that error structure is sparse. You could pretty easily kludge it by wrapping an lmer optim call and updating the response, fixed, and random effect design matrices with every iteration.

Vince

On Feb 12, 2014, at 7:03 PM, Rolf Turner wrote:

> 
> 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.
> <specifics.pdf><demoScript.txt>



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