amce: Estimator for the average causal mediation effect (AMCE)

Description Usage Arguments Examples

View source: R/amce.R

Description

Estimates the average causal mediation effect (AMCE) for all provided treatments. Can estimate clustered and/or robust standard errors.

Usage

1
2
amce(data, post, ..., cluster = NULL, subgroup = NULL, diff = NULL,
  subset = NULL)

Arguments

data

Data

post

Post treatment variable.

...

The treatment components (without quotes).

cluster

Variable indicating clusters if SEs should be clustered.

subgroup

Variable(s) indicating which subgroups, if any, to independently calculate AMCEs for. If multiple subgroups are provided, then it will iterate over each combination.

diff

If diff is provided, it will calculate the difference in AMCE between the unique values of diff.

subset

Subset to estimate AMCEs for.

Examples

1
2
3
4
## Not run: 
 amce <- amce(data, post, treatment_1, treatment_2)

## End(Not run)

mikajoh/wiggle documentation built on May 29, 2019, 11:03 p.m.