Re: [R] How to set starting values for lmer?

From: Douglas Bates <dmbates_at_gmail.com>
Date: Wed 31 Aug 2005 - 03:30:15 EST

On 8/30/05, Shige Song <shigesong@gmail.com> wrote:
> Dear All,
>
> Can anyone give me some hints about how to set starting values for a lmer
> model? For complicated models like this, good starting values can help the
> numerical computation and make the model converge faster. Thanks!
>
> Shige

I agree but I haven't gotten around to designing how that could be done. It could be easy or difficult depending on how you want to represent the starting values.

If you look at the (only) lmer method function you will see that it has a section

          if (lmm) {                    ## linear mixed model
              .Call("lmer_initial", mer, PACKAGE="Matrix")
              .Call("lmer_ECMEsteps", mer, cv$niterEM, cv$EMverbose,
PACKAGE = "Matrix")
              LMEoptimize(mer) <- cv

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).

There is no purpose in setting initial values for the fixed-effects parameters or the variance of the per-observation noise term because these are profiled out of the optimization. The optimization is only over the values in the Omega slot.

I can allow those values to be set from an argument and only call "lmer_initialize" if that argument is missing. Will that be sufficient for you?



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Aug 31 03:35:28 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:00 EST