Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in mediate function when fitting multilevel mediation analysis with crossed random factors #55

Open
bamaly opened this issue Mar 21, 2023 · 0 comments

Comments

@bamaly
Copy link

bamaly commented Mar 21, 2023

I was trying to fit a multilevel mediation analysis with crossed random factors using the mediate function from the mediation package in R. For the med.fit and out.fit models, I used lmer. However, I received the following error message:

"Error in mediate(med.fit, out.fit, treat = "condition_numfct", mediator = "attr_rating", :
mediate does not support more than two levels per model."

I am not sure, but I suspect that this error may be due to the mediate function not supporting crossed random factors. Can anyone confirm this? If so, does anyone know of any alternative packages or functions that can handle multilevel mediation analyses with crossed random factors?

Thank you for any help or insights you can provide!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant