Learn R Programming

ccmm (version 1.0)

ccmm.sa: Sensitivity analysis

Description

Estimated total indirect effects (TIDE) given correlation coefficients (rho)

Usage

ccmm.sa(y, M, tr, x = NULL, w = NULL, stp = 0.01)

Arguments

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

stp

Increment of the correlation coefficient

Value

Matrix of rho and TIDE

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]);

rslt.sa <- ccmm.sa(outcome, mediators, treatment, covariates);
# }

Run the code above in your browser using DataLab