Skip to content
Prev 1997 / 20628 Next

Reproducing results from an old lmer fit

I haven't installed R packages from the sources before.  Looking in the e-mail help archives, it appears that this is potentially problematic; do you have a suggested link for the entire procedure? For Windows I found a very brief description at http://win-builder.r-project.org (I think I might need more detail than this).  I can do it on
either Mac or Windows OS, is one easier than the other?

RE the branches/allcoef version you mention, I looked at https://svn.r-project.org/R/branches/ and didn't see this.

My main goal is to produce the exact results I produced before since I need to extract some of the information from this model that I hadn't saved.  I'm not sure which lmer version I had installed on 5/08.  Thus, I need to attempt to install the version that was available on 5/08 and perhaps the one preceding that, and check which one matches my results.
On 2/26/09 1:17 PM, "Douglas Bates" <bates at stat.wisc.edu> wrote:
On Thu, Feb 26, 2009 at 10:31 AM, Afshartous, David
<DAfshartous at med.miami.edu> wrote:
Notice the large change in the estimated correlation with very little
change in the log-likelihood or deviance.  This is an indication that
the model is over-specified.

Are you able to install R packages from the sources?  If so, you could
try the branches/allcoef version from the SVN archive.  On an
optimization problem like this it may be more successful in converging
to the global optimum instead of the local optimum.


This, by the way, is why I am always looking for better optimization
code to incorporate in R.  The code in the nlme and lme4 packages just
evaluates the log-likelihood or the REML criterion for the model at
the observed data and a proposed value of the parameters.  The actual
optimization is done by the nlminb optimizer which is based on very
old Fortran code written by David Gay.  Even though the code is old
this optimizer is, in my experience, more reliable than the optimizers
used by optim and by nlm.

It is surprisingly difficult to find good optimization code that is
covered by an open source license.  There is not a strong tradition of
open source code in the numerical analysis world.  Many users are
enthused about the ipopt library (projects.coin-or.org/Ipopt) but even
though that code is open source it depends on other software, some of
which is commercial.

The optimization in lme4 is minimization of a real-valued function of
real parameters, some of which are subject to non-negativity
constraints.  It is not an unconstrained optimization problem but the
constraints are very simple.  The objective function can be evaluated
and, in theory, the gradient can also be evaluated.  However, for
models with non-nested random effects evaluation of the gradient is
much, much more difficult and time consuming than is evaluation of the
objective function.  Thus the ideal optimizer would allow for simple
"box constraints" on the parameters and would be derivative-free or at
least allow for numeric evaluation of the gradient.  If anyone knows
of such code covered by a valid open-source license I would be
delighted to hear of it.