Description Usage Arguments Details Value Author(s) References Examples
hdbm
is a Bayesian inference method that uses continuous shrinkage priors
for high-dimensional mediation analysis, developed by Song et al (2018).
hdbm
provides estimates for the regression coefficients as well as
the posterior inclusion probability for ranking mediators.
1 | hdbm(Y, A, M, C1, C2, beta.m, alpha.a, burnin, ndraws)
|
Y |
numeric outcome vector. |
A |
numeric exposure vector. |
M |
numeric matrix of mediators of Y and A. |
C1 |
numeric matrix of extra covariates in the outcome model |
C2 |
numeric matrix of extra covariates in the mediator model |
beta.m |
numeric vector of initial beta.m in the outcome model |
alpha.a |
numeric vector of initial alpha.a in the mediator model |
burnin |
number of iterations to run the MCMC before sampling |
ndraws |
number of draws to take from MCMC after the burnin period |
hdbm
uses two regression models for the two conditional relationships,
Y | A, M, C1 and M | A, C2. For the outcome model, hdbm
uses
Y = M β_M + A * β_A + C1* β_CY + ε_Y
For the mediator model, hdbm
uses the model
M = A * α_A + C2 * α_C2 + ε_M
For high dimensional tractability, hdbm
employs continuous Bayesian
shrinkage priors to select mediators and makes the two following assumptions:
First, it assumes that all the potential mediators contribute small effects
in mediating the exposure-outcome relationship. Second, it assumes
that only a small proportion of mediators exhibit large effects
("active" mediators). hdbm
uses a Metropolis-Hastings within Gibbs
MCMC to generate posterior samples from the model.
hdbm returns a list with 11 elements (each of length ndraws
),
sampled from the burned in MCMC:
Outcome model mediator coefficients
Whether or not each beta.m belongs to the larger normal component (1) or smaller normal component (0)
Mediator model exposure coefficients
Whether or not each alpha.a belongs to the larger normal component (1) or smaller normal component (0)
beta.a coefficient
Proportion of non zero beta.m coefficients
Proportion of non zero alpha.a coefficients
standard deviation of the smaller normal component for mediator-outcome coefficients (beta.m)
standard deviation of the larger normal component for mediator-outcome coefficients (beta.m)
Standard deviation of the smaller normal component for exposure-mediator coefficients (alpha.a)
Standard deviation of the larger normal component for exposure-mediator coefficients (alpha.a)
Alexander Rix
Yanyi Song, Xiang Zhou et al. Bayesian Shrinkage Estimation of High Dimensional Causal Mediation Effects in Omics Studies. bioRxiv 10.1101/467399
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(hdbm)
Y <- hdbm.data$y
A <- hdbm.data$a
# grab the mediators from the example data.frame
M <- as.matrix(hdbm.data[, paste0("m", 1:100)], nrow(hdbm.data))
# We just include the intercept term in this example.
C <- matrix(1, 1000, 1)
beta.m <- rep(0, 100)
alpha.a <- rep(0, 100)
set.seed(12345)
hdbm.out <- hdbm(Y, A, M, C, C, beta.m, alpha.a,
burnin = 1000, ndraws = 100)
# Which mediators are active?
active <- which(colSums(hdbm.out$r1 * hdbm.out$r3) > 50)
colnames(M)[active]
|
[1] "m12" "m65" "m89"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.