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: NamedTuple

Container for aggregated treatment effect parameters.

This class implements the maketables plug-in interface for publication-quality tables. See Publication Tables with maketables.

Attributes:
overall_attfloat

The estimated overall average treatment effect on the treated.

overall_sefloat

Standard error for overall ATT.

aggregation_type{‘simple’, ‘dynamic’, ‘group’, ‘calendar’}

Type of aggregation performed.

event_timesnumpy.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_eventnumpy.ndarray, optional

ATT estimates specific to each event time value.

se_by_eventnumpy.ndarray, optional

Standard errors specific to each event time value.

critical_valuesnumpy.ndarray, optional

Critical values for uniform confidence bands.

influence_funcnumpy.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_overallnumpy.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_timeint, optional

Minimum event time (for dynamic effects).

max_event_timeint, optional

Maximum event time (for dynamic effects).

balanced_event_thresholdint, optional

Balanced event time threshold.

estimation_paramsdict

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_infodict

Information about the function call that created this object.

Methods

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

Attributes

aggregation_type

Type of aggregation performed.

att_by_event

ATT estimates specific to each event time value.

balanced_event_threshold

Balanced event time threshold.

call_info

Information about the function call that created this object.

critical_values

Critical values for uniform confidence bands.

estimation_params

DID estimation parameters.

event_times

Event/group/time values depending on aggregation type.

influence_func

Influence function of the aggregated parameters.

influence_func_overall

Influence function for the overall ATT.

max_event_time

Maximum event time.

min_event_time

Minimum event time.

overall_att

Estimated overall average treatment effect on the treated.

overall_se

Standard error for overall ATT.

se_by_event

Standard errors specific to each event time value.