Learn R Programming

ccmm (version 1.0)

ccmm.sensitivity: Sensitivity analysis

Description

Estimate the total indirect effect (TIDE) given a correlation coefficient

Usage

ccmm.sensitivity(rh, y, M, tr, x = NULL, w = NULL)

Arguments

rh

Correlation coefficient

y

Vector of continuous outcomes

M

Matrix of compositional data

tr

Vector of continuous or binary treatments

x

Matrix of covariates

w

Vector of weights on samples

Value

Estimated TIDE given a correlation coefficient

References

Sohn, M.B. and Li, H. (2017). Compositional Mediation Analysis for Microbiome Studies (AOAS: In revision)

Examples

Run this code
# NOT RUN {
# Load test data
data(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]);

ccmm.sensitivity(rh=0, outcome, mediators, treatment, covariates);
# }

Run the code above in your browser using DataLab