- data
a data object (a data frame or a data.table)
- iv_name
name of the independent variable
- mediator_name
name of the mediator variable
- dv_name
name of the dependent variable
- covariates_names
names of covariates to control for
- robust_se
if TRUE
, heteroskedasticity-consistent
standard errors will be used in quasi-Bayesian simulations. By default,
it will be set as FALSE
if nonparametric bootstrap is used and
as TRUE
if quasi-Bayesian approximation is used.
- iterations
number of bootstrap samples. The default is set at 1000,
but consider increasing the number of samples to 5000, 10000, or an
even larger number, if slower handling time is not an issue.
- sigfigs
number of significant digits to round to
- output_type
if output_type = "summary_dt"
,
return the summary data.table; if output_type = "mediate_output"
,
return the output from the mediate
function in the
'mediate' package; if output_type = "indirect_effect_p"
,
return the p value associated with the indirect effect estimated
in the mediation model (default = "summary_dt")
- silent
if silent = FALSE
, mediation analysis summary,
estimation method, sample size, and number of simulations will be
printed; if silent = TRUE
, nothing will be printed.
(default = FALSE)