mediate_hilma
applies high-dimensional linear mediation
analysis (HILMA) as proposed by Zhou et al. (2020).
mediate_hilma(
A,
M,
Y,
aic_tuning = FALSE,
nlambda = 5,
lambda_minmax_ratio = 0.1,
center = TRUE
)
A list containing, for each exposure, a data frame of the estimated direct, total, and global mediation effects. A p-value is provided for the global mediation effect.
length n
numeric vector containing a single exposure variable
or size n x q
numeric matrix containing multiple exposures. If a matrix,
should be low-dimensional (q << n
).
n x p
numeric matrix of high-dimensional mediators.
length n
numeric vector containing continuous outcome variable.
logical flag for whether to select the tuning parameter using
AIC. Default is FALSE
as this was not the preferred approach by the
HILMA authors (see references for more detail).
number of candidate lambdas for AIC tuning. Default is 5. If
aic_tuning=F
this parameter is ignored.
ratio of the minimum lambda attempted in
AIC tuning to the maximum. If aic_tuning=F
, ignored.
logical flag for whether the variables should be centered. Default
is TRUE
.
mediate_hilma
is a wrapper function for the freebird::hilma()
function,
which fits the "high-dimensional linear mediation analysis" model proposed by
Zhou et al. (2020) for mediation settings when there are high-dimensional
mediators and one or several exposures. The function returns estimates of
the direct effect, total effect, and global mediation effect, the last of which
is tested for statistical significance with a reported p-value. For additional
detail, see the attached reference as well as the freebird::hilma()
documentation.
Zhou, R. R., Wang, L. & Zhao, S. D. Estimation and inference for the indirect effect in high-dimensional linear mediation models. Biometrika 107, 573-589 (2020)
A <- med_dat$A
M <- med_dat$M
Y <- med_dat$Y
# Implement HILMA with one exposure
out <- mediate_hilma(A, M, Y)
out$a1
Run the code above in your browser using DataLab