[Mediation-information] Error message for models fitted with lmer: Mediator model not yet implemented?

Hause Lin hause.lin at mail.utoronto.ca
Mon Aug 15 18:53:49 CEST 2016


Hi,

I've previously used this package to fit simple linear models and it worked
very well. But recently I've been trying to do this with multilevel models
(lmer) and I'm getting this message:

Error in mediation::mediate(model.m = mediatorModel, model.y =
outcomeModel,  :
  mediator model is not yet implemented

Below are my models. Can anyone tell why I'm getting that error message?

mediatorModel <- lmer(m ~ x1 + x2 + (1 | id), data = df)

outcomeModel <- lmer(y ~ m + x1 + x2 + (1 | id), data = df)

mediation <- mediate(model.m = mediatorModel, model.y = outcomeModel, sims
= 100, robustSE = F, treat = "x2", mediator = "m")

I really appreciate any help anyone can provide. Thanks!

Best,
Hause
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/mediation-information/attachments/20160815/918b6123/attachment.html>


More information about the Mediation-information mailing list