Description Usage Arguments Examples
Decomposes the effect of an exposure on an outcome into a direct effect operating through a set of intermediary variables, and a direct effect involving other pathways. A key assumption is the dual lack of confounding of the exposure-outcome, and the mediator-outcome associations. Described in chapter 5.2.1 of Tyler's book.
1 2 |
dat |
a dataframe containing the exposure, outcome, mediators, and confounders |
A |
the exposure of interest. Currently must be categorical (or binary) |
Y |
the outcome, currently must be continuous, ordinal or binary |
M |
the mediators of interest |
C |
confounders of either X -> M and/or M -> Y. |
fam |
specifies GLM link function and distribution of residuals. Default is gaussian(link = identity) |
boot |
number of bootstrap samples used to build the 95p confidence intervals |
nmin |
number of participants all categories of exposure must have; samples will be redrawn if this criterion is not met |
mids |
an optional mids object to serve as template for imputations |
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.