I'm trying to perform a mediationg regression analysis. I already testen Y ~ X, M ~ X, Y~X+M, but when I'm trying to run X ~ M+Y I get in trouble.
I have many X values (independent values) but these are all different kind of variables (binomial, continuous etc.). It's all working fine untill I try to perform the following code:
M3D <- lmer(Experience ~Productivity+TOTALMOP+(1|SubjectID),
+ data = Data)
Experience is a numeric variable, which can take any value. This is measured once for every picker (which explains the variable factor in the code).
Productivity is a continuous variable representing the productivity of the order picker for 1 specific order.
TotalMOP is the behavior deviance of the order picker, which is a factor variable, with factor 1-4.
Does anybody understand why I get the error: M3D <- lmer(Experience ~Productivity+TOTALMOP+(1|SubjectID),
data = Data)
While I try to run this code?
Thank you in advance!