[R-sig-ME] Specifying and fitting LME model with unstructured error correlation within subject

Kogan, Clark cl@rk@kog@n @ending from w@u@edu
Fri Nov 30 18:20:01 CET 2018


I have some data where a number of individuals have taken a few different subtests and there is 1 response per individual for each subtest. I am fitting the following model using lmer:

mod <- lmer(score ~ faculty + gender + subtest + gender:subtest + faculty:gender + faculty:subtest+ (subtest|id), data = score)

When fitting this model, I get the error:
Error: number of observations (=219) <= number of random effects (=219) for term (subtest | id); the random-effects parameters and the residual variance (or scale parameter) are probably unidentifiable

The error makes sense to me - as there is only one data point for every subtest*id, and so we cannot differentiate the random effects from the residuals. What I would like to be able to do is specify that the residuals have an unstructured correlation matrix within individuals to account for the fact that an individual will likely have some correlation between their subtest scores.

Is there a way to do this in lmer or a similar package so that I can still get Kenwood Rodgers or Satterthwaite corrected tests of effects (e.g., with pbkrtest or lmerTest).

Thanks,
Clark


	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list