[R] How to set starting values for lmer?
Douglas Bates
dmbates at gmail.com
Mon Sep 5 22:25:49 CEST 2005
On 9/5/05, Shige Song <shigesong at gmail.com> wrote:
> Dear Professor Bates,
>
> Thanks, that will probably do the job.
OK, I will add that capability.
> By the way, how to cite lme4 in my work?
For now I suggest citing either the package itself or the R News
article that I wrote about it.
@Article{Rnews:Bates:2005,
author = {Douglas Bates},
title = {Fitting Linear Mixed Models in {R}},
journal = {R News},
year = 2005,
volume = 5,
number = 1,
pages = {27--30},
month = {May},
url = {http://CRAN.R-project.org/doc/Rnews/},
}
Eventually there will be a book that you can cite but I have to finish
writing it first :-)
>
> Shige
>
> On 8/31/05, Douglas Bates <dmbates at gmail.com> wrote:
> >
> > On 8/30/05, Shige Song <shigesong at 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?
> >
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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
>
More information about the R-help
mailing list