mdd_CS: Apply Callaway and Sant'Anna (2021) estimate

View source: R/estim_CS.R

mdd_CSR Documentation

Apply Callaway and Sant'Anna (2021) estimate

Description

Simple wrapper to function att_gt from package did.

Usage

mdd_CS(mdd_dat, timing_treat_var = NULL, panel = NULL, ...)

Arguments

mdd_dat

An object of class mdd_dat created by mdd_data_format

timing_treat_var

variable indicating the timing to treat. Not necessary, unless the dataset is not balanced

panel

Argument panel to att_gt. If not specified, will try to guess.

...

further objects passed to att_gt

Value

Output of att_gt, therefore of class MP.

Examples

dat <- sim_dat_staggered(as_mdd = TRUE, Time=6)
mdd_CS(dat)

## with a single treatment time, this is equivalent to mdd_event_study()
dat_common <- sim_dat_common(as_mdd = TRUE, timing_treatment = 5:10)
all.equal(unname(coef(mdd_event_study(dat_common))),
          broom::tidy(mdd_CS(dat_common, base_period = "universal"))$estimate[-4])

MatthieuStigler/multiDiff documentation built on Feb. 14, 2025, 12:02 a.m.