Description Usage Arguments Value Author(s)
View source: R/reverseMAdata.R
Apply mediate function from the mediation package in scenarios of reverse causality.
1 | reverseMAdata(X, M, Y, SEED = 1, nSimImai = 1000)
|
X |
is the exposure |
M |
is the mediator |
Y |
is the outcome |
SEED |
is the seed |
nSimImai |
is the number of simulations for the mediate method |
a list of Estimates and p-values for the direct and indirect effects in situations with and without reverse causality.
Annie Thwing, Sharon Lutz
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.