Skip to content
Prev 810 / 20628 Next

lmer bug / feature

On 4/8/08, Robert Kushler <kushler at oakland.edu> wrote:

            
That is indeed a bug.  Thanks for reminding me.  I will fix that.
John Maindonald has also pointed out that the ordering of the terms in
the VarCorr display is counter-intuitive.

The ordering of the terms is not arbitrary - they are ordered by
decreasing numbers of levels in the grouping factor.  At least that
was the intention.  Versions before -11 had a bug in the code and the
terms were not being reordered when they should have been.  I fixed
that bug but, in the process, introduced bug #1.

This ordering is chosen to facilitate the selection of a fill-reducing
permutation for the sparse Cholesky decomposition and I would be
reluctant to change that part of the code.  For big data sets and
models with multiple random effects terms a good fill-reducing
permutation is the key to saving both time and memory when fitting the
model.

I'm not sure how much work would be involved in reordering the terms
for display.

I'll fix the first bug.  Patches for the second infelicity (this
really is an infelicity, not a bug) would be gladly accepted.  The
relevant function is the hidden function formatVC in lme4/R/lmer.R.
The first argument is a list and the fix may be as simple as reversing
the order of the elements of that list before operating on it.  This
would create an ordering by increasing numbers of levels, not
necessarily the ordering of the terms in the original formula.  You
would need to work a bit harder to get that.

I have taken the liberty of cc:'ing this reply to the R-SIG-Mixed-Models list.