Quick testing after pixi add r-mediation works well for lm and glm models. But lmer models require unloading lmerTest as mediation.mediate() expects an lme4 object not an lmerTest object. See this discussion which is still relevant.
Will need to spend more time on this later...
Quick testing after
pixi add r-mediationworks well forlmandglmmodels. Butlmermodels require unloadinglmerTestasmediation.mediate()expects an lme4 object not an lmerTest object. See this discussion which is still relevant.Will need to spend more time on this later...