Question

I am making mixed models, using lme4, which included three factors (S,M,R) with 2,3 and 4 levels. But I am missing observations for S3:M2:R1, so I am not able to check for the 3-way interaction.

Is there any way to tell lme4 to ignore estimating a parameter for this level?

Instead of it giving me the message: Error in mer_finalize(ans) : Downdated X'X is not positive definite, 21.

Was it helpful?

Solution

Construct the interaction variable by hand, and drop levels. It would be nice if you gave a reproducible example, but:

mydata <- transform(mydata,SMRint=interaction(S,M,R,drop=TRUE))
lmer(response~SMRint+(1|grpvar),data=mydata)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top