mediate_hdmm {hdmed}R Documentation

High-dimensional Multivariate Mediation Analysis with Principal Directions of Mediation

Description

mediate_hdmm estimates the first "direction of mediation" in the causal mediation mechanism of an exposure A, an outcome Y, and high-dimensional mediators M as proposed by Chén et al. (2018).

Usage

mediate_hdmm(
  A,
  M,
  Y,
  sims = 1000,
  boot_ci_type = "bca",
  ci_level = 0.95,
  tol = 10^-5,
  theta = rep(1, 5),
  w1 = rep(1, ncol(M)),
  interval = 10^6,
  step = 10^4,
  imax = 100
)

Arguments

A

numeric vector containing exposure variable.

M

numeric matrix of high-dimensional mediators. It is not recommended to supply a matrix with more mediators than observations.

Y

numeric vector containing continuous outcome variable.

sims

number of Monte Carlo draws for nonparametric bootstrap or quasi-Bayesian approximation. See mediate. Default is 1000.

boot_ci_type

a character string indicating the type of bootstrap confidence intervals for when boot = TRUE. If "bca", bias-corrected and accelerated (BCa) confidence intervals will be estimated. If "perc", percentile confidence intervals will be estimated (see mediation::mediate()). Default is "bca".

ci_level

the designated confidence level. Default 0.95.

tol

tolerance. Default 10^-5.

theta

numeric vector of length 5 describing starting value of pathway coefficients. Default is a vector of 1's.

w1

numeric vector of the same length of A specifying PDM starting values. Default is a vector of 1's.

interval

numeric vector proportional to the intervals from where the smoothing parameter is searched. Default is 10^6.

step

numerical number specifying step width for smoothing parameter search. Default is 10^4.

imax

integer specifying the maximum number of iterations allowed. Default is 100.

Details

HDMM provides latent variable approach to high-dimensional mediation analysis. The function mediate_hdmm uses a likelihood-based approach to compute principal directions of mediation (PDMs), which are loading weights used to linearly combine the inputted mediators to form a single, latent variable that replaces the original mediators in the analysis. Though HDMM cannot be used to estimate the global mediation effect or the contributions of specific mediators, it can still can be useful for inferring whether there is mediation occurring through the set of mediators as a joint system. See the provided reference for more details.

Value

A list containing:

Source

https://github.com/oliverychen/PDM

References

Chén, O. Y. et al. High-dimensional multivariate mediation with application to neuroimaging data. Biostatistics 19, 121-136 (2018).

Examples

A <- as.numeric(scale(med_dat$A)) # can help to standardize
M <- scale(med_dat$M[,1:8])
Y <- as.numeric(scale(med_dat$Y))

out <- mediate_hdmm(A, M, Y, sims = 5, tol = 10^-3, imax = 50)
out$effects


[Package hdmed version 1.0.0 Index]