Description Author(s) References Examples
Estimate the direct and indirect (mediation) effects of treatment on the outcome when intermediate variables (mediators) are compositional and high-dimensional.
Michael B. Sohn
Maintainer: Michael B. Sohn <msohn@mail.med.upenn.edu>
Sohn, M.B. and Li, H. (2017). Compositional Mediation Analysis for Microbiome Studies. (AOAS: In revision)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
# Load test data
data(ccmm_test_data);
head(ccmm_test_data);
outcome <- ccmm_test_data[,1];
treatment <- ccmm_test_data[,2];
mediators <- as.matrix(ccmm_test_data[,3:22]);
covariates <- as.matrix(ccmm_test_data[,23:24]);
# Run CCMM
rslt.ccmm <- ccmm(outcome, mediators, treatment, covariates);
# Sensitivity analysis
rslt.sa <- ccmm.sa(outcome, mediators, treatment, covariates);
plot(rslt.sa, type="l", xlab=expression(rho), ylab="TIDE")
abline(h=rslt.ccmm$TIDE, lty=2)
abline(h=0, lty=3)
cisa <- tide.ci.zero.rho(outcome, mediators, treatment, covariates)
csqs <- quantile(cisa, c(0.025, 0.975))
segments(0, csqs[1], 0, csqs[2])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.