Skip to contents

Returns a tidy data frame of model coefficients from a run_did() result: all regressors (treatment and covariates), in the format expected by modelsummary::modelsummary(). The table is read from the fit stored at estimation time; the VCOV type chosen in run_did() (vcov / cluster) is already reflected in the standard errors.

Usage

# S3 method for class 'did_result'
tidy(x, conf.int = FALSE, conf.level = 0.95, ...)

Arguments

x

A did_result object returned by run_did().

conf.int

Logical; add conf.low/conf.high columns? Default FALSE.

conf.level

Confidence level for conf.int. Default 0.95. Intervals use Student-t quantiles with the fit's degrees of freedom, matching fixest/broom conventions.

...

Unused; kept for compatibility with the broom::tidy() generic.

Value

A tibble with columns term, estimate, std.error, statistic, p.value (and optionally conf.low, conf.high).

Examples

if (FALSE) { # \dontrun{
res <- run_did(df, outcome = y, treatment = D, fe = ~ id + year)
broom::tidy(res)
broom::tidy(res, conf.int = TRUE)
} # }