| mediate_plasso {hdmed} | R Documentation |
Pathway LASSO for Mediation Analysis with High-Dimensional Mediators
Description
mediate_plasso fits a high-dimensional mediation model
with the penalized likelihood described by Zhao and Luo (2022), estimating the
mediation contributions of each site.
Usage
mediate_plasso(
A,
M,
Y,
lambdas = NULL,
select_lambda = FALSE,
vss_rep = 5,
vss_cutoff = 0.1,
omega_ratio = 1,
phi = 2,
maxit = 5000,
tol = 1e-06
)
Arguments
A |
numeric vector containing exposure variable. |
M |
numeric matrix of high-dimensional mediators. |
Y |
numeric vector containing continuous outcome variable. |
lambdas |
numeric vector of tuning parameters |
select_lambda |
logical flag indicating whether to conduct a tuning
parameter selection using the Variable Selection Stability Criterion
described by Sun et al. (2013). Default is |
vss_rep |
if |
vss_cutoff |
if |
omega_ratio |
ratio of the |
phi |
value of the |
maxit |
the maximum number of iterations. Default is 5000. |
tol |
convergence tolerance. Default is 10^-6. |
Details
Pathway LASSO fits a high-dimensional mediation model with a likelihood
that directly penalizes the mediator-outcome effects, exposure-mediator
effects, and mediation contributions (i.e., the mediation "pathways").
The shrinkage of the model is determined by three parameters–phi,
omega, and lambda–with higher values tending to result in more
sparsity. Mediation results are returned for every unique value in the
inputted lambdas argument, in increasing order, excluding potentially
any for which the estimation was unsuccessful. For details on the exact
likelihood, see the first reference.
When implementing multiple lambdas (i.e., using either the default argument
to lambdas or specifying one's own vector), there is an option to
perform a tuning parameter selection using the Variable Selection Stability
Criterion proposed by Sun et al. (2013), which chooses the parameter for
which the variable selection is most stable in repeated data-splitting.
However, implementing this can be computationally costly, especially with a
long list of tuning parameters, since it involves re-fitting pathway LASSO
many times.
Value
A list containing:
-
lambdas: thelambdas attempted in the same order as the objects inall_fits. -
all_fits: a list containing, for eachlambda, adata.frameof the estimated mediation effects. -
chosen_lambda: ifselect_lambdaisTRUE, thelambdachosen by VSSC. -
chosen_fit: ifselect_lambdaisTRUE, the fit corresponding to the chosenlambda. -
vss: ifselect_lambdaisTRUE, adata.framecontaining the variable selection stabilities.
Source
https://github.com/zhaoyi1026/PathwayLasso
References
Zhao, Y. & Luo, X. Pathway LASSO: pathway estimation and selection with high-dimensional mediators. Stat. Interface 15, 39-50 (2022).
Sun, W., Wang, J. & Fang, Y. Consistent selection of tuning parameters via variable selection stability. J. Mach. Learn. Res. 14, 3419-3440 (2013).
Examples
A <- med_dat$A
M <- med_dat$M[,1:8]
Y <- med_dat$Y
# fit pathway LASSO for two tuning parameters and retrieve their fits
out <- mediate_plasso(A, M, Y, lambdas = c(10^-3, 10^-2), tol = 1e-4)
head(out$all_fits$lambda1)
head(out$all_fits$lambda2)