knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

ccmEstimator

Travis build status AppVeyor build status Codecov test coverage

The goal of ccmEstimator is to perform comparative causal mediation analysis to compare the mediation effects of different treatments via a common mediator.

Installation

You can install the released version of ccmEstimator from CRAN with:

install.packages("ccmEstimator")

Example

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)


xw2510/ccmEstimator documentation built on Dec. 23, 2021, 7:14 p.m.