Returns a broom-style tidy data frame for the output of
cohortTimeATTs(). Renames the snake_case columns to broom conventions
(se -> std.error, p_value -> p.value, ci_low / ci_high ->
conf.low / conf.high), keeps the time column, and adds a term
column ("cohort_<cohort label>_time_<time>") plus a statistic column
(estimate / std.error) so the schema parallels tidy.cohortStudy() and
tidy.eventStudy() for downstream bind_rows() consumers. When the input
carries a selected column (fetwfe / betwfe), it is passed through as
the final column.
Usage
# S3 method for class 'cohortTimeATTs'
tidy(x, ...)Arguments
- x
A
cohortTimeATTsobject returned bycohortTimeATTs().- ...
Unused; present for S3 compatibility.
Value
A data frame with one row per (cohort, time) cell and columns
term, time, estimate, std.error, statistic, p.value,
conf.low, conf.high, and (if present in the input) selected.
Details
Confidence intervals are the pointwise 1 - alpha Wald bounds
cohortTimeATTs() computed (encoding the alpha passed there); like
tidy.cohortStudy() this method passes them through rather than
recomputing at a custom conf.level.
Examples
if (FALSE) { # \dontrun{
res <- fetwfeWithSimulatedData(
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)
)
broom::tidy(cohortTimeATTs(res))
} # }