Open mattansb opened 3 years ago
I support it, but it's not a priority because mediation
has a low number of users (see https://ipub.com/dev-corner/apps/r-package-downloads/). If you want to develop this further, you can send a pull request and be a coauthor on the package.
Two notes on your code:
1) If you develop a method for table_results.mediate()
then you don't need to develop separate get_nodes()
and get_edges()
methods.
2) If the layout of these results is always like that, then you could consider dynamically generating it by first placing a mediation model in rows 1:2, and then placing all covariates in the rightmost column of rows 3:numcovariates.
(3000 weekly downloads is a little?) Hmmm is there another package you would recommend for simple mediation with covariable control?
It wasn't meant to discourage this direction, but to indicate that I highly welcome the contribution but won't develop it myself. My focus is currently on incorporating support for OpenMx, multilevel, multigroup, and mixture models. The number of users is small relative to lavaan and OpenMx.
That being said, you've got everything you need to add this with your code and my feedback (+ blessing).
I think it would be very very useful if tidySEM supported mediation analysis from the
mediation
package.Here is a rough draft (:
The default layout should be something like this:
Created on 2021-07-21 by the reprex package (v2.0.0)