hima | R Documentation |
hima
is used to estimate and test high-dimensional mediation effects.
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,
Bonfcut = 0.05,
verbose = FALSE,
...
)
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 = |
Bonfcut |
Bonferroni-corrected p value cutoff applied to select significant mediators. Default = |
verbose |
logical. Should the function be verbose? Default = |
... |
other arguments passed to |
A data.frame containing mediation testing results of selected mediators.
mediation name of selected significant mediator.
coefficient estimates of exposure (X) –> mediators (M) (adjusted for covariates).
coefficient estimates of mediators (M) –> outcome (Y) (adjusted for covariates and exposure).
mediation (indirect) effect, i.e., alpha*beta.
relative importance of the mediator.
joint raw p-value of selected significant mediator (based on Bonferroni method).
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
## 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, # Disabled only for simulation data
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, # Disabled only for simulation data
verbose = TRUE)
hima.logistic.fit
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.