Skip to content
Prev 163909 / 398506 Next

lme4, error in mer_finalize(ans)

On Fri, Dec 5, 2008 at 3:44 PM, B. Meijering <B.Meijering at student.rug.nl> wrote:
That, admittedly obscure, error message relates to the fixed-effects
specification rt ~ length + length:pos being rank deficient.  If you
look at the summary of the linear model fit you will see that there
are 3 coefficients that are not determined because of singularities.
The lm function detects the singularities and fits a lower-rank model.
 The lmer function is not as sophisticated.  It just detects the
singularities and quits.

The length and the position are confounded.
pos
len 1 2 3 4 5 6
  4 2 2 2 2 0 0
  5 2 2 2 2 2 0
  6 2 2 2 2 2 2

(By the way, I changed the name of the length variable to len as
typing "length" makes me expect the function called length.)

Even when you remove this confounding by creating the len:pos
interaction separately as a factor, you will still get singularities
because there is only one len:pos combination for len = 6.

You will need to think of a way of parameterizing the fixed effects
without the singularities.  You can check for singularities in the
summary of the lm fit.