High-dimensional mediation analysis with de-biased lasso penalty
Source:R/hima_dblasso.R
hima_dblasso.Rdhima_dblasso is used to estimate and test high-dimensional mediation effects using de-biased lasso penalty.
Usage
hima_dblasso(
X,
M,
Y,
COV = NULL,
topN = NULL,
scale = TRUE,
FDRcut = 0.05,
verbose = FALSE,
parallel = FALSE,
ncore = 1
)Arguments
- X
a vector of exposure. Do not use
data.frameormatrix.- M
a
data.frameormatrixof high-dimensional mediators. Rows represent samples, columns represent variables.- Y
a vector of outcome. Can be either continuous or binary (0-1). Do not use
data.frameormatrix.- COV
a
data.frameormatrixof covariates dataset for testing the association M ~ X and Y ~ M.- topN
an integer specifying the number of top markers from sure independent screening. Default =
NULL. IfNULL,topNwill beceiling(n/log(n)), wherenis the sample size. If the sample size is greater than topN (pre-specified or calculated), all mediators will be included in the test (i.e. low-dimensional scenario).- scale
logical. Should the function scale the data? Default =
TRUE.- FDRcut
HDMT pointwise FDR cutoff applied to select significant mediators. Default =
0.05.- verbose
logical. Should the function be verbose? Default =
FALSE.- parallel
logical. Enable parallel computing feature? Default =
FALSE.- ncore
number of cores to run parallel computing Valid when
parallel = TRUE.
Value
A data.frame containing mediation testing results of significant mediators (FDR <FDRcut).
- Index:
mediation name of selected significant mediator.
- alpha_hat:
coefficient estimates of exposure (X) –> mediators (M) (adjusted for covariates).
- alpha_se:
standard error for alpha.
- beta_hat:
coefficient estimates of mediators (M) –> outcome (Y) (adjusted for covariates and exposure).
- beta_se:
standard error for beta.
- IDE:
mediation (indirect) effect, i.e., alpha*beta.
- rimp:
relative importance of the mediator.
- pmax:
joint raw p-value of selected significant mediator (based on HDMT pointwise FDR method).
References
Perera C, Zhang H, Zheng Y, Hou L, Qu A, Zheng C, Xie K, Liu L. HIMA2: high-dimensional mediation analysis and its application in epigenome-wide DNA methylation data. BMC Bioinformatics. 2022. DOI: 10.1186/s12859-022-04748-1. PMID: 35879655; PMCID: PMC9310002
Examples
if (FALSE) { # \dontrun{
# Note: In the following examples, M1, M2, and M3 are true mediators.
# Y is continuous and normally distributed
# Example:
data(ContinuousOutcome)
pheno_data <- ContinuousOutcome$PhenoData
mediator_data <- ContinuousOutcome$Mediator
hima_dblasso.fit <- hima_dblasso(
X = pheno_data$Treatment,
Y = pheno_data$Outcome,
M = mediator_data,
COV = pheno_data[, c("Sex", "Age")],
scale = FALSE, # Disabled only for simulation data
FDRcut = 0.05,
verbose = TRUE
)
hima_dblasso.fit
} # }