Group-time ATT(g,t) under staggered adoption
Usage
group_time_att(Y, first_treated, comparison = "not-yet-treated")
Arguments
- Y
Balanced panel.
- first_treated
Numeric vector of adoption periods (1-based),
with NA or Inf for never-treated.
- comparison
"never-treated" or
"not-yet-treated".
Value
A list with att (named list keyed by (g,t)),
cohorts, T, n, comparison,
estimate, method.
Examples
set.seed(10)
n <- 30; Tn <- 5
first <- rep(c(3, 4, Inf), each = 10)
Y <- matrix(rnorm(n * Tn), n, Tn)
for (i in seq_len(n)) if (is.finite(first[i])) Y[i, first[i]:Tn] <- Y[i, first[i]:Tn] + 1
g <- group_time_att(Y, first, comparison = "never-treated")
g$estimate
#> [1] 1.577269