hima {HIMA} | R Documentation |
High-dimensional Mediation Analysis
Description
hima
is used to estimate and test high-dimensional mediation effects.
Usage
hima(
X,
Y,
M,
COV.XM = NULL,
COV.MY = COV.XM,
Y.family = c("gaussian", "binomial"),
M.family = c("gaussian", "negbin"),
penalty = c("MCP", "SCAD", "lasso"),
topN = NULL,
parallel = FALSE,
ncore = 1,
scale = TRUE,
verbose = FALSE,
...
)
Arguments
X |
a vector of exposure. Do not use data.frame or matrix. |
Y |
a vector of outcome. Can be either continuous or binary (0-1). Do not use data.frame or matrix. |
M |
a |
COV.XM |
a |
COV.MY |
a |
Y.family |
either 'gaussian' (default) or 'binomial', depending on the data type of outcome ( |
M.family |
either 'gaussian' (default) or 'negbin' (i.e., negative binomial), depending on the data type of
mediator ( |
penalty |
the penalty to be applied to the model. Either 'MCP' (the default), 'SCAD', or 'lasso'. |
topN |
an integer specifying the number of top markers from sure independent screening.
Default = |
parallel |
logical. Enable parallel computing feature? Default = |
ncore |
number of cores to run parallel computing Valid when |
scale |
logical. Should the function scale the data? Default = |
verbose |
logical. Should the function be verbose? Default = |
... |
other arguments passed to |
Value
A data.frame containing mediation testing results of selected mediators.
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.
Bonferroni.p: statistical significance of the mediator (Bonferroni-corrected p value).
BH.FDR: statistical significance of the mediator (Benjamini-Hochberg FDR).
References
Zhang H, Zheng Y, Zhang Z, Gao T, Joyce B, Yoon G, Zhang W, Schwartz J, Just A, Colicino E, Vokonas P, Zhao L, Lv J, Baccarelli A, Hou L, Liu L. Estimating and Testing High-dimensional Mediation Effects in Epigenetic Studies. Bioinformatics. 2016. DOI: 10.1093/bioinformatics/btw351. PMID: 27357171. PMCID: PMC5048064
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)
hima.fit <- hima(X = himaDat$Example1$PhenoData$Treatment,
Y = himaDat$Example1$PhenoData$Outcome,
M = himaDat$Example1$Mediator,
COV.XM = himaDat$Example1$PhenoData[, c("Sex", "Age")],
Y.family = 'gaussian',
scale = FALSE,
verbose = TRUE)
hima.fit
# When Y is binary (should specify Y.family)
# Example 2 (binary outcome):
head(himaDat$Example2$PhenoData)
hima.logistic.fit <- hima(X = himaDat$Example2$PhenoData$Treatment,
Y = himaDat$Example2$PhenoData$Disease,
M = himaDat$Example2$Mediator,
COV.XM = himaDat$Example2$PhenoData[, c("Sex", "Age")],
Y.family = 'binomial',
scale = FALSE,
verbose = TRUE)
hima.logistic.fit
## End(Not run)