ControlGroup

class ControlGroup(StrEnum):
    NOT_YET_TREATED = 'not_yet_treated'
    NEVER_TREATED = 'never_treated'

Comparison group used for the counterfactual.

Use a member as the control_group argument of estimate_changes_in_changes_effects.

Attributes

Name Type Description
NOT_YET_TREATED Units not yet treated at the time period of interest.
NEVER_TREATED Units that are never treated.

Examples

Use not-yet-treated units as the comparison group:

>>> from qte.datasets import load_mpdta
>>> from qte.distributional_did import ControlGroup, TrtGroupConfig, estimate_changes_in_changes_effects
>>> res = estimate_changes_in_changes_effects(
...     load_mpdta(),
...     "lemp",
...     TrtGroupConfig("first.treat", 0),
...     "year",
...     "countyreal",
...     control_group=ControlGroup.NOT_YET_TREATED,
...     bootstrap_config=2,
... )