Error in eval_f(x, ...) : Downdated VtV is not positive definite

Hi all,

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!

This error means that the variance due to random effects is pretty small and close to zero. How many samples do you have per subjectID?

Also, why are you doing X ~ M + Y as part of a mediation analysis? The method I'm familiar with ('s_(1986)_steps_for_mediation) just requires the first three that you've done so far.

I have 20 to 55 samples per SubjectID, it differs a lot...

I was following this site:

But when I check the interpretation I see they actually don't use the X ~ Y+M model... So I guess I just leave it like this :slight_smile:
Thank you for mentioning it!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.