moderndid.MPResult#
- class moderndid.MPResult(groups: ndarray, times: ndarray, att_gt: ndarray, vcov_analytical: ndarray, se_gt: ndarray, critical_value: float, influence_func: ndarray, n_units: int | None = None, wald_stat: float | None = None, wald_pvalue: float | None = None, aggregate_effects: object | None = None, alpha: float = 0.05, estimation_params: dict = {}, G: ndarray | None = None, weights_ind: ndarray | None = None)[source]#
Bases:
NamedTupleContainer for group-time average treatment effect results.
This class implements the
maketablesplug-in interface for publication-quality tables. See Publication Tables with maketables.- Attributes:
- groups
numpy.ndarray Which group (defined by period first treated) each group-time ATT is for.
- times
numpy.ndarray Which time period each group-time ATT is for.
- att_gt
numpy.ndarray The group-time average treatment effects for each group-time combination.
- vcov_analytical
numpy.ndarray Analytical estimator for the asymptotic variance-covariance matrix.
- se_gt
numpy.ndarray Standard errors for group-time ATTs. If bootstrap used, provides bootstrap-based SE.
- critical_value
float Critical value - simultaneous if obtaining simultaneous confidence bands, otherwise based on pointwise normal approximation.
- influence_func
numpy.ndarray The influence function for estimating group-time average treatment effects.
- n_units
int, optional The number of unique cross-sectional units.
- wald_stat
float, optional The Wald statistic for pre-testing the common trends assumption.
- wald_pvalue
float, optional The p-value of the Wald statistic for pre-testing common trends.
- aggregate_effects
object, optional An aggregate treatment effects object.
- alpha
float The significance level (default 0.05).
- estimation_params
dict Dictionary containing DID estimation parameters including:
call_info: original function call information
control_group: ‘nevertreated’ or ‘notyettreated’
anticipation_periods: number of anticipation periods
estimation_method: estimation method used
bootstrap: whether bootstrap was used
uniform_bands: whether simultaneous confidence bands were computed
G: unit-level group assignments
weights_ind: unit-level sampling weights
- groups
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
Attributes
Unit-level group assignments.
Aggregate treatment effects object.
Significance level.
Group-time average treatment effects.
Critical value for confidence intervals.
DID estimation parameters.
Which group (defined by period first treated) each group-time ATT is for.
Influence function for estimating group-time average treatment effects.
Number of unique cross-sectional units.
Standard errors for group-time ATTs.
Which time period each group-time ATT is for.
Analytical estimator for the asymptotic variance-covariance matrix.
P-value of the Wald statistic for pre-testing common trends.
Wald statistic for pre-testing common trends.
Unit-level sampling weights.