Skip to contents

Aggregate ATT(g,t)

Usage

aggregate_att(gt, scheme = "simple", horizon = NULL)

Arguments

gt

Result of group_time_att.

scheme

"simple", "event" or "cohort".

horizon

Optional event-time cap for "event".

Value

A list with estimate, scheme (and profile for the by-event-time and by-cohort schemes).

Examples

set.seed(8)
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
gt <- group_time_att(Y, first, comparison = "never-treated")
aggregate_att(gt, scheme = "event")$profile
#>         0         1         2 
#> 0.4299441 0.5058429 0.3671030