eHIMA | R Documentation |
eHIMA
is used to estimate and test high-dimensional mediation effects using an efficient algorithm.
eHIMA(
X,
M,
Y,
COV = NULL,
Y.family = c("gaussian", "binomial"),
penalty = c("MCP", "SCAD", "lasso"),
topN = NULL,
scale = TRUE,
FDRcut = 0.05,
verbose = FALSE
)
X |
a vector of exposure. |
M |
a |
Y |
a vector of continuous outcome. Do not use data.frame or matrix. |
COV |
a matrix of adjusting covariates. Rows represent samples, columns represent variables. Can be |
Y.family |
either 'gaussian' (default) or 'binomial', depending on the data type of outcome ( |
penalty |
the penalty to be applied to the model (a parameter passed to function |
topN |
an integer specifying the number of top markers from sure independent screening.
Default = |
scale |
logical. Should the function scale the data? Default = |
FDRcut |
BH-FDR-corrected p value cutoff applied to define and select significant mediators. Default = |
verbose |
logical. Should the function be verbose? Default = |
A data.frame containing mediation testing results of selected mediators (Bonferroni-adjusted p value <Bonfcut
).
ID: index of selected significant mediator.
alpha: coefficient estimates of exposure (X) –> mediators (M).
alpha_se: standard error for alpha.
beta: coefficient estimates of mediators (M) –> outcome (Y) (adjusted for exposure).
beta_se: standard error for beta.
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).
Zhang H, Hong X, Zheng Y, Hou L, Zheng C, Wang X, Liu L. High-Dimensional Quantile Mediation Analysis with Application to a Birth Cohort Study of Mother–Newborn Pairs. Bioinformatics. 2024. DOI: 10.1093/bioinformatics/btae055. PMID: 38290773; PMCID: PMC10873903
## Not run:
# Note: In the following example, M1, M2, and M3 are true mediators.
data(himaDat)
# When Y is continuous and normally distributed
# Example 1 (continuous outcome):
head(himaDat$Example1$PhenoData)
eHIMA.fit <- eHIMA(X = himaDat$Example1$PhenoData$Treatment,
Y = himaDat$Example1$PhenoData$Outcome,
M = himaDat$Example1$Mediator,
COV = himaDat$Example1$PhenoData[, c("Sex", "Age")],
Y.family = 'gaussian',
scale = FALSE,
verbose = TRUE)
eHIMA.fit
# When Y is binary (should specify Y.family)
# Example 2 (binary outcome):
head(himaDat$Example2$PhenoData)
eHIMA.fit <- eHIMA(X = himaDat$Example2$PhenoData$Treatment,
Y = himaDat$Example2$PhenoData$Disease,
M = himaDat$Example2$Mediator,
COV = himaDat$Example2$PhenoData[, c("Sex", "Age")],
Y.family = 'binomial',
scale = FALSE,
verbose = TRUE)
eHIMA.fit
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.