diff_diff.Comparison2x2#
- class diff_diff.Comparison2x2[source]#
Bases:
objectA single 2x2 DiD comparison in the Bacon decomposition.
- treated_group#
The timing group used as “treated” in this comparison.
- Type:
Any
- control_group#
The timing group used as “control” in this comparison. For
comparison_type="treated_vs_never", this is the literal string"never_treated", which refers to the post-remap U bucket (the paper’sUper Goodman-Bacon 2021 footnote 11). On inputs with no remapped always-treated units this is exactly the true never-treated set; with remapping it is the broader U bucket. CheckBaconDecompositionResults.n_never_treatedandn_always_treated_remappedfor the precise composition.- Type:
Any
- comparison_type#
Type of comparison: “treated_vs_never”, “earlier_vs_later”, or “later_vs_earlier”.
- Type:
Methods
__init__(treated_group, control_group, ...)Attributes
- __init__(treated_group, control_group, comparison_type, estimate, weight, n_treated, n_control, time_window)#
- classmethod __new__(*args, **kwargs)#