Skip to content

lmer() using factor() vs ordered() predictors

1 message · Ken Knoblauch

#
Mike Lawrence <Mike.Lawrence at ...> writes:
A few preliminary observerations about your data set:
table(a$id)

10116 10144 10147 10157 10199 10280 10757 10775 11008 11010 
   74    89    83    79    87    82    63     

10775 11008 11010 
  2    89    43

You only have 2 observations for id = 10775.

Also, if you look at the distribution of the data, rt tends to be 
skewed:

histogram(~ rt | id, a)

I tried fitting a saturated model with lm and MASS:::boxcox
showed that the confidence interval contained 0, suggesting a 
log transformation.  If there was a Gamma or lognormal
link, I would recommend using glmer with them, but there
is not, yet.  

Taking that on board and even setting verbose = TRUE, I still
get an error:

lmer(LogRT ~ (1 | id) + arrow * tone * flanker * sstroop * 
      target *  location, data = a1, verbose = TRUE)
Error in mer_finalize(ans) : Downdated X'X is not positive definite, 89.

You have 2^5 * 3 = 96 terms in the formula but no observer 
performed all conditions.  Perhaps, a simpler model would
help or more data?

Making the variables ordered would cause contr.poly to be 
used instead of contr.treatment so that the coefficients
will be for terms of orthogonal polynomials. All of your
factors but 1 have only 2 levels, so I'm not sure what that
gets you or why it makes a difference here. Someone else
will certainly have more insight into this.

Hope that is useful.

best,

Ken