The building block of Callaway and Sant'Anna (2021): for cohort
g and period t, the change in outcome from the base
period g - 1 to t among cohort-g units, minus
the same change among a clean comparison group.
Usage
morie_grouptimeatt(Y, g, control = "notyet")
Arguments
- Y
Balanced outcome matrix, units by periods.
- g
First treated period index per unit (0-based), Inf
for never treated.
- control
"notyet" (default) uses units not yet treated
at max(t, g); "never" uses never-treated units only.
Both comparison groups the paper defines are available.
Value
A named list of cells, each with att,
n_treated, n_control, post, rel and
the influence function infl.
References
Callaway, B. and Sant'Anna, P. H. C. (2021).
Difference-in-differences with multiple time periods. Journal of
Econometrics, 225(2), 200-230.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
S <- c("a", "b", "c")
morie_grouptimeatt(V, S)
#> list()