Augment user-supplied data with fitted values and residuals from a betwfe fit
Source:R/broom_methods.R
augment.betwfe.RdSame shape as augment.fetwfe(), dispatched on class "betwfe". data
is auto-sorted by (unit, time) and any first-period-treated units
are auto-trimmed; pass the same raw pdata you handed to betwfe().
Examples
if (FALSE) { # \dontrun{
sim <- simulateData(genCoefs(G = 3, T = 6, d = 2, density = 0.5,
eff_size = 2),
N = 120, sig_eps_sq = 1, sig_eps_c_sq = 0.5, seed = 123)
res <- betwfeWithSimulatedData(sim)
broom::augment(res, data = sim$pdata)
} # }