mcma_BK: Multiple/marginal causal mediation analysis

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function performs marginal causal mediation analysis under the linear structural equation modeling framework. It assumes the mediators are causally independent.

Usage

1
2
mcma_BK(X, M, Y, sims = 1000, boot = TRUE, boot.ci.type = c("bca", "perc"), 
    conf.level = 0.95, p.adj.method = c("BH", "bonferroni", "BY"))

Arguments

X

a vector of length n, the randomized treatment assignment.

M

a n\times p data matrix, the mediators.

Y

a vector of length n, the outcome of interest.

sims

a numeric value, the number of bootstrap replications. Default is 1000.

boot

a logic variable, if FALSE a quasi-Bayesian approximation is used for confidence intervals; if TRUE nonparametric bootstrap will be used. Default is TRUE. See mediate.

boot.ci.type

a character of the way of calculating bootstrap confidence interval. If boot.ci.type = "bca", the bias corrected confidence interval is returned; if boot.ci.type = "perc", the percentile confidence interval is returned.

conf.level

a numeric value, the designated significance level. Default is 0.05, i.e., return 95\% confidence interval.

p.adj.method

a character of the method implemented for multiple testing adjustment. See p.adjust.

Details

Consider the case of multiple mediators, when the mediators are causally independent, i.e., given the treatment assignment, the potential outcome of different mediators are conditionally independent, it is equivalent to conduct a series of marginal mediation analysis on each individual mediators.

M_{i}^{(j)}=α_{0j}+α_{j}Z_{i}+ξ_{ij},

Y_{i}=β_{0j}+γ_{j} Z_{i}+β_{j}M_{i}^{(j)}+η_{ij},

where ξ_{ij} and η_{ij} are model errors with mean zero and independent of each other. See mediate for details about single mediator analysis.

Value

IE

an outcome matrix, the estimate, p-value, lower and upper bound of the confidence interval, and the adjusted p-value of the indirect effect for each mediator.

DE

an outcome matrix, this provides the estimate of the direct effects, as well as the p-value, lower and upper bound of the confidence interval.

alpha

an outcome matrix, the estimate of the treatment effect on each mediator, as well as the p-value, lower and upper bound of the confidence interval and the adjusted p-value.

beta

an outcome matrix, the estimate of the mediator effect on the outcome with a one-unit increment, as well as the p-value, lower and upper bound of the confidence interval and the adjusted p-value.

gamma

an outcome matrix, th estimate, p-value, lower and upper bound of the confidence interval, and the adjusted p-value of γ_{j} in the model. For each mediator, this is the effect not explained by the mediator.

IE.total

an outcome matrix, the estimate, p-value, lower and upper bound of the total indirect effect.

Author(s)

Yi Zhao, Johns Hopkins University, zhaoyi1026@gmail.com;

Martin A. Lindquist, Johns Hopkins University, mal2053@gmail.com;

Brian S. Caffo, Johns Hopkins University, bcaffo@gmail.com.

See Also

mediate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#############################################
data(env.example)
X<-get("X",env.example)
M<-get("M",env.example)
Y<-get("Y",env.example)
Phi<-get("Phi",env.example)

# marginal mediation analysis on causally independent mediators
M.tilde<-M%*%Phi
mcma_BK(X,M.tilde,Y,boot=FALSE)
#############################################

zhaoyi1026/spcma documentation built on May 4, 2019, 1:23 p.m.