moderndid.AGGTEResult#
- class moderndid.AGGTEResult(overall_att: float, overall_se: float, aggregation_type: Literal['simple', 'dynamic', 'group', 'calendar'], event_times: ndarray | None = None, att_by_event: ndarray | None = None, se_by_event: ndarray | None = None, critical_values: ndarray | None = None, influence_func: ndarray | None = None, influence_func_overall: ndarray | None = None, min_event_time: int | None = None, max_event_time: int | None = None, balanced_event_threshold: int | None = None, estimation_params: dict = {}, call_info: dict = {})[source]#
Bases:
NamedTupleContainer for aggregated treatment effect parameters.
This class implements the
maketablesplug-in interface for publication-quality tables. See Publication Tables with maketables.- Attributes:
- overall_att
float The estimated overall average treatment effect on the treated.
- overall_se
float Standard error for overall ATT.
- aggregation_type{‘simple’, ‘dynamic’, ‘group’, ‘calendar’}
Type of aggregation performed.
- event_times
numpy.ndarray, optional Event/group/time values depending on aggregation type:
For dynamic effects: length of exposure
For group effects: treatment group indicators
For calendar effects: time periods
- att_by_event
numpy.ndarray, optional ATT estimates specific to each event time value.
- se_by_event
numpy.ndarray, optional Standard errors specific to each event time value.
- critical_values
numpy.ndarray, optional Critical values for uniform confidence bands.
- influence_func
numpy.ndarray, optional Influence function of the aggregated parameters.
For overall ATT: 1D array of length n_units
For dynamic/group/calendar: 2D array of shape (n_units, n_events) containing influence functions for each event-specific ATT
- influence_func_overall
numpy.ndarray, optional Influence function for the overall ATT (1D array of length n_units). This is stored separately for compatibility with both aggregation types.
- min_event_time
int, optional Minimum event time (for dynamic effects).
- max_event_time
int, optional Maximum event time (for dynamic effects).
- balanced_event_threshold
int, optional Balanced event time threshold.
- estimation_params
dict Dictionary containing DID estimation parameters including:
alpha: significance level
bootstrap: whether bootstrap was used
uniform_bands: whether uniform confidence bands were computed
control_group: ‘nevertreated’ or ‘notyettreated’
anticipation_periods: number of anticipation periods
estimation_method: estimation method used
- call_info
dict Information about the function call that created this object.
- overall_att
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
Attributes
Type of aggregation performed.
ATT estimates specific to each event time value.
Balanced event time threshold.
Information about the function call that created this object.
Critical values for uniform confidence bands.
DID estimation parameters.
Event/group/time values depending on aggregation type.
Influence function of the aggregated parameters.
Influence function for the overall ATT.
Maximum event time.
Minimum event time.
Estimated overall average treatment effect on the treated.
Standard error for overall ATT.
Standard errors specific to each event time value.