bmem: Mediation analysis based on bootstrap

Description Usage Arguments Details Value Author(s) References

View source: R/bmem.R

Description

Mediation analysis based on bootstrap

Usage

1
2
3
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, ...)

Arguments

x

A data set

ram

RAM path for the mediaiton model

indirect

A vector of indirect effec

v

Indices of variables used in the mediation model. If omitted, all variables are used.

method

list: listwise deletion, pair: pairwise deletion, mi: multiple imputation, em: EM algorithm.

ci

norm: normal approximation CI, perc: percentile CI, bc: bias-corrected CI, bca: BCa

cl

Confidence level. Can be a vector.

boot

Number of bootstraps

m

Number of imputations

varphi

Percent of data to be downweighted

st

Starting values

robust

Robust method

moment

Select mean structure or covariance analysis. moment=FALSE, covariance analysis. moment=TRUE, mean and covariance analysis.

max_it

Maximum number of iterations in EM

...

Other options for sem function can be used.

Details

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').

Value

The on-screen output includes the parameter estimates, bootstrap standard errors, and CIs.

Author(s)

Zhiyong Zhang and Lijuan Wang

References

Zhang, Z., & Wang, L. (2013). Methods for mediation analysis with missing data. Psychometrika, 78(1), 154-184.



bmem documentation built on May 19, 2017, 8:37 p.m.
Search within the bmem package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.