Mediation analysis based on bootstrap
bmem(x, ram, indirect, v, method='tsml', ci='bc', cl=.95,
boot=1000, m=10, varphi=.1, st='i', robust=FALSE,
max_it=500, moment=FALSE, ...)A data set
RAM path for the mediaiton model
A vector of indirect effec
Indices of variables used in the mediation model. If omitted, all variables are used.
list: listwise deletion, pair: pairwise deletion, mi: multiple imputation, em: EM algorithm.
norm: normal approximation CI, perc: percentile CI, bc: bias-corrected CI, bca: BCa
Confidence level. Can be a vector.
Number of bootstraps
Number of imputations
Percent of data to be downweighted
Starting values
Robust method
Select mean structure or covariance analysis. moment=FALSE, covariance analysis. moment=TRUE, mean and covariance analysis.
Maximum number of iterations in EM
Other options for sem function can be used.
The on-screen output includes the parameter estimates, bootstrap standard errors, and CIs.
The indirect effect can be specified using equations such as a*b, a*b+c, and a*b*c+d*e+f. A vector of indirect effects can be used indirect=c('a*b', 'a*b+c').
Zhang, Z., & Wang, L. (2013). Methods for mediation analysis with missing data. Psychometrika, 78(1), 154-184.