knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of ccmEstimator is to perform comparative causal mediation analysis to compare the mediation effects of different treatments via a common mediator.
You can install the released version of ccmEstimator from CRAN with:
install.packages("ccmEstimator")
This is a basic example which shows you how to solve a common problem:
library(ccmEstimator) ## basic example code # load example data. ICAapp is a data frame with 14 variables. It is the application data used to illustrate comparative causal mediation analysis methods in Bansak (2020). data(ICAapp) set.seed(321, kind = "Mersenne-Twister", normal.kind = "Inversion") ccm.results <- getCCM(Y = "dapprp", T1 = "trt1", T2 = "trt2", M = "immorp", data = ICAapp, noInteraction = TRUE, sigLevel = 0.05, boots = 1000) summary(ccm.results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.