Skip to contents

Returns a tidy data frame of model coefficients from a run_did() result. Delegates to broom::tidy.fixest() on the underlying fixest model so that all regressors (treatment and covariates) appear in the output — the format expected by modelsummary::modelsummary().

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.

...

Additional arguments passed to broom::tidy.fixest().

Value

A data frame 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)
} # }