[R-sig-ME] Starting values slot

Ben Bolker bolker at ufl.edu
Mon Jul 20 04:40:57 CEST 2009


Stuart Luppescu wrote:
> A long time ago (2005) Doug Bates wrote this (in the R-help list,
> perhaps) with regard to specifying starting values for lmer:
> 
>>> for linear mixed models. The object "mer" is a mixed-effects
>>> representation and the list "cv" is the control values. The only
>>> thing that the C function "lmer_initial" does is set the initial
>>> values of the relative precision matrices for the random effects.
>>> These are the inverses of the variance-covariance matrices relative to
>>> the variance of the per-observation noise term. They are stored
>>> (upper triangle only) in a slot called "Omega" of the mer class (which
>>> is contained in the lmer class).
> 
> Was this ever implemented? I don't see the Omega slot mentioned in the
> mer-class documentation. I have a model that has been running for more
> than 8 hours now (on a *very* fast machine, even) -- 2.6 million records
> within two grouping factors containing 75,000 and 33,000 levels. (And
> this version is just with a random sample of the full data.) When adding
> fixed effects to the model, I'd like to avoid having to wait many hours
> for it to finish, so I'd like to be able to speed things up by giving it
> starting values from the previous version of the model. 
> 
> Can I use start=lm.previous at Omega, or is there another way to do this?
> 
> Thanks.

  There's a function called ST2Omega() hidden in the namespace
(lme4:::ST2Omega), but reading the help for "lme4" it looks like you
should now just use the ST slot:

library(lme4)

fm0 <- lmer(Reaction ~ (Days|Subject), sleepstudy)

fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)

fm1B <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy,
             start = fm0 at ST)

  ?  I'm a little out of my depth here ?

  Ben Bolker



-- 
Ben Bolker
Associate professor, Biology Dep't, Univ. of Florida
bolker at ufl.edu / www.zoology.ufl.edu/bolker
GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc




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