dblassoHIMA {HIMA} | R Documentation |
This is the function for high-dimensional mediation analysis using de-biased lasso HIMA with de-biased lasso
Description
dblassoHIMA
is used to estimate and test high-dimensional mediation effects using de-biased lasso penalty.
Usage
dblassoHIMA(
X,
Y,
M,
Z,
Y.family = c("gaussian", "binomial"),
topN = NULL,
scale = TRUE,
FDRcut = 0.05,
verbose = FALSE
)
Arguments
X |
a vector of exposure. |
Y |
a vector of outcome. Can be either continuous or binary (0-1). |
M |
a |
Z |
a |
Y.family |
either 'gaussian' (default) or 'binomial', depending on the data type of outcome ( |
topN |
an integer specifying the number of top markers from sure independent screening.
Default = |
scale |
logical. Should the function scale the data? Default = |
FDRcut |
FDR cutoff applied to define and select significant mediators. Default = |
verbose |
logical. Should the function be verbose? Default = |
Value
A data.frame containing mediation testing results of selected mediators (FDR <FDPcut
).
alpha: coefficient estimates of exposure (X) –> mediators (M).
beta: coefficient estimates of mediators (M) –> outcome (Y) (adjusted for exposure).
gamma: coefficient estimates of exposure (X) –> outcome (Y) (total effect).
alpha*beta: mediation effect.
% total effect: alpha*beta / gamma. Percentage of the mediation effect out of the total effect.
p.joint: joint raw p-value of selected significant mediator (based on FDR).
#' @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
## Not run:
# Note: In the following examples, M1, M2, and M3 are true mediators.
data(himaDat)
# When Y is continuous and normally distributed
# Example 1 (continuous outcome):
head(himaDat$Example1$PhenoData)
dblassohima.fit <- dblassoHIMA(X = himaDat$Example1$PhenoData$Treatment,
Y = himaDat$Example1$PhenoData$Outcome,
M = himaDat$Example1$Mediator,
Z = himaDat$Example1$PhenoData[, c("Sex", "Age")],
Y.family = 'gaussian',
scale = FALSE,
verbose = TRUE)
dblassohima.fit
# When Y is binary (should specify Y.family)
# Example 2 (binary outcome):
head(himaDat$Example2$PhenoData)
dblassohima.logistic.fit <- dblassoHIMA(X = himaDat$Example2$PhenoData$Treatment,
Y = himaDat$Example2$PhenoData$Disease,
M = himaDat$Example2$Mediator,
Z = himaDat$Example2$PhenoData[, c("Sex", "Age")],
Y.family = 'binomial',
scale = FALSE,
verbose = TRUE)
dblassohima.logistic.fit
## End(Not run)