
Plot Bacon Decomposition of TWFE Estimates
bacon_decomp_plot.RdCreates a scatter plot of the Goodman-Bacon (2021) decomposition, showing how each 2x2 DID comparison contributes to the overall TWFE estimate. Points are sized by weight and colored by comparison type.
Arguments
- decomp
A data frame from
bacondecomp::bacon(), with columnsestimate,weight, andtype.- weighted_avg
Numeric. The overall TWFE estimate (weighted average). If
NULL(default), computed from the decomposition.- title
Character string. Plot title. Default is
"Goodman-Bacon Decomposition".