spcma: Sparse principal component based mediation analysis

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

Description

This function performs sparse principal component based mediation analysis with multiple mediators under the linear structural equation modeling framework. The new mediators, which are causally independent, are linear projections of the original ones with sparse loadings.

Usage

1
2
3
4
spcma(X, M, Y, adaptive = FALSE, var.per = 0.8, n.pc = NULL, D = NULL, 
  gamma = 0, eps = 1e-04, maxsteps = 2000, per.jump = 0.7, boot = TRUE, 
  sims = 1000, boot.ci.type = c("bca", "perc"),   conf.level = 0.95, 
  p.adj.method=c("BH","bonferroni","BY"), PC.run = TRUE)

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.

adaptive

a logic variable, if adaptive = TRUE, the number of principal components (PCs) is determined based on the percentage of variance explained. Default is FALSE.

var.per

a numeric variable, the designated percentage of variance explained, which determines the number of PCs. Will be ignored if adaptive = FALSE.

n.pc

an integer variable, the number of PCs considered. Will be ignored if adpative = TRUE. Default is NULL. If n.pc = NULL, will set adaptive to TRUE.

D

the penalty matrix prespecified for structured regularization in the generalized lasso. Default is NULL. When D = NULL, it is set to be a diagonal matrix, that is the lasso penalty is imposed.

gamma

a numeric variable greater than or equal to 0, indicating the ratio of the two tuning parameters, one for the fusion penalty, and the other for the pure \ell_{1} penalty. Default is 0. See fusedlasso.

eps

a numeric variable indicating the multiplier for the ridge penalty, in the case that M is wide (more columns than rows). If numeric problems occur, make eps larger. Default is 1e-4. See fusedlasso.

maxsteps

an integer specifying the maximum number of steps for the algorithm to take before termination. Default is 2000. See fusedlasso.

per.jump

a numeric value, used for tuning parameter selection, the quantile of cut-off for the total variance change under different tuning parameter values. Default is 0.7. The higher the value, the sparser the loading matrix.

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.

sims

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

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.

PC.run

a logic value, whether perform principal component analysis based mediation analysis. Default is TRUE.

Details

Consider the case of multiple mediators, and there is a linear projection of the original mediators \tilde{M}^{(j)}=Mφ_{j}, where Φ=(φ_{1},…,φ_{p}) is an orthonormal matrix, such that for j\neq k,

\tilde{M}^{(j)}~\perp~\tilde{M}^{(k)}~|~X.

We can perform a series of marginal mediation analysis on the new projected mediators, i.e.,

\tilde{M}_{i}^{(j)}=α_{0j}+α_{j}X_{i}+ξ_{ij},

Y_{i}=β_{0j}+γ X_{i}+β_{j}\tilde{M}_{i}^{(j)}+η_{ij},

where ξ_{ij} and η_{ij} are model errors with mean zero and independent of each other.

In order to yield intuitive interpretations, the loading matrix is sparsified based on a structured lasso penalty. This package considers a special case as the fused lasso. The structure is given in the matrix D (also see fusedlasso).

Value

When PC.run = TRUE, two output lists, one for PCA-based analysis (PCA) and one for sparse PCA-based analysis (SPCA). The value of PCA is the same as the outcome in mcma_PCA.

For SPCA

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, for each mediator, this provides the estimate of the direct effect, 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.

W

the sparsified loading matrix.

var.per

the cumulative proportion of variance explained by the PCs.

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.

References

Zhao, Lindquist and Caffo (2018). “Sparse principal component based high-dimensional mediation analysis”. arXiv preprint arXiv:1806.06118.

Huang and Pan (2016). “Hypothesis test of mediation effect in causal mediation model with high-dimensional continuous mediators”. Biometrics, 72(2):402-413.

Zou, Hastie and Tibshirani (2006). “Sparse principal component analysis”. Journal of computational and graphical statistics, 15(2):265-286.

See Also

fusedlasso.

Examples

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

# sparse principal component based mediation analysis
spcma(X,M,Y,adaptive=TRUE,var.per=0.75,boot=FALSE,PC.run=FALSE)
#############################################

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