Learn R Programming

HIMA (version 2.3.0)

qHIMA: High-dimensional quantile mediation analysis

Description

qHIMA is used to estimate and test high-dimensional quantile mediation effects.

Usage

qHIMA(
  X,
  M,
  Y,
  COV = NULL,
  penalty = c("MCP", "SCAD", "lasso"),
  topN = NULL,
  tau = 0.5,
  scale = TRUE,
  Bonfcut = 0.05,
  verbose = FALSE,
  ...
)

Value

A data.frame containing mediation testing results of selected mediators (Bonferroni-adjusted p value <Bonfcut).

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 Bonferroni method).

Arguments

X

a vector of exposure. Do not use data.frame or matrix.

M

a data.frame or matrix of high-dimensional mediators. Rows represent samples, columns represent mediator variables.

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 NULL.

penalty

the penalty to be applied to the model (a parameter passed to function conquer.cv.reg in package conquer. Either 'MCP' (the default), 'SCAD', or 'lasso'.

topN

an integer specifying the number of top markers from sure independent screening. Default = NULL. If NULL, topN will be 2*ceiling(n/log(n)), where n is 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).

tau

quantile level of outcome. Default = 0.5. A vector of tau is accepted.

scale

logical. Should the function scale the data? Default = TRUE.

Bonfcut

Bonferroni-corrected p value cutoff applied to select significant mediators. Default = 0.05.

verbose

logical. Should the function be verbose? Default = FALSE.

...

reserved passing parameter.

References

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

Examples

Run this code
if (FALSE) {
# Note: In the following example, M1, M2, and M3 are true mediators.
data(himaDat)

head(himaDat$Example5$PhenoData)

qHIMA.fit <- qHIMA(
  X = himaDat$Example5$PhenoData$Treatment,
  M = himaDat$Example5$Mediator,
  Y = himaDat$Example5$PhenoData$Outcome,
  COV = himaDat$Example5$PhenoData[, c("Sex", "Age")],
  tau = c(0.3, 0.5, 0.7),
  scale = FALSE, # Disabled only for simulation data
  Bonfcut = 0.05,
  verbose = TRUE
)
qHIMA.fit
}

Run the code above in your browser using DataLab