Skip to contents

Returns the cohort-by-period ATT(g,t) table computed by event_study(estimator = "cs") or att(estimator = "cs") as a real att_gt_result object with its own plot() and autoplot() methods. Bootstrap metadata (when the originating call used bootstrap = TRUE) is carried along so simultaneous-inference overlays keep working.

Usage

att_gt(x)

Arguments

x

An es_result or att_result object estimated with estimator = "cs".

Value

A data frame of class c("att_gt_result", "data.frame") with columns g (cohort), t (calendar time), estimate, and std_error.

Examples

if (FALSE) { # \dontrun{
res <- event_study(df, outcome = y, time = year, timing = g,
                   unit = id, estimator = "cs")
gt <- att_gt(res)
plot(gt)                  # heatmap
plot(gt, type = "facet")  # one panel per cohort
} # }