Skip to contents

Thin wrapper around bacondecomp::bacon. Decomposes a two-way fixed-effects DiD estimate into a weighted average of all possible 2x2 DiD comparisons. Hard-errors if bacondecomp is not installed.

Usage

morie_did_bacon_decomposition(data, outcome, treatment, unit, time)

Arguments

data

Balanced panel data.

outcome

Outcome column.

treatment

Binary treatment indicator that turns on at onset.

unit

Unit identifier.

time

Time period.

Value

A list with components (data frame) and overall_estimate.

References

Goodman-Bacon, A. (2021). Difference-in-differences with variation in treatment timing. Journal of Econometrics, 225(2), 254–277.