diff_diff.duration_did_results.DurationDiDPretestResults#
- class diff_diff.duration_did_results.DurationDiDPretestResults[source]#
Bases:
DiagnosticAppendix B Algorithm 2 pre-treatment specification test.
For every interior pre-treatment date
t(strictly between the baseline andanchor_period, the last pre-treatment date) the contrast compares the hazard relationship attwith its value at the fixed anchor: the average-hazard GAP undermethod="cd"and the cumulative-increment RATIO undermethod="ph". The whole-individual bootstrap gives one SD per contrast, a simultaneous critical value from the maximum absolute centered pivot, symmetric bandscontrast +/- crit_value * seand themax-|t|statistic. The test rejects when any band excludes zero, which is exactlyp_value <= alphaunder the inverse-empirical-CDF quantile.- periods#
The tested interior pre-treatment dates (
J).- Type:
np.ndarray
- anchor_period#
The last pre-treatment date (the fixed anchor).
- Type:
Any
- contrast#
Point contrasts, one per tested date (NaN when unavailable).
- Type:
np.ndarray
- se#
Bootstrap SDs of the contrasts (NaN when unavailable).
- Type:
np.ndarray
- band_lower, band_upper
Simultaneous bands at level
1 - alpha.- Type:
np.ndarray
- p_value#
Empirical tail fraction of the bootstrap maxima at or above
statistic(NaN when unavailable).- Type:
- n_bootstrap, n_bootstrap_valid
Requested draws and complete draws for this family.
- Type:
- status#
"ok","disabled"(n_bootstrap=0),"unavailable_insufficient_pre_periods"(no interior pre-date),"unavailable_ph_support"(a zero control increment at a tested date or the anchor under PH),"unavailable_nonfinite_moments","unavailable_failed_draws", or"unavailable_zero_se".- Type:
Methods
__init__(method, periods, anchor_period, ...)summary()Human-readable summary.
to_dataframe()One row per tested pre-treatment date.
to_dict()JSON-serializable dictionary.
Attributes
band_lowerband_uppern_bootstrapn_bootstrap_valid- __init__(method, periods, anchor_period, contrast, se, band_lower, band_upper, crit_value, statistic, p_value, reject, alpha, n_bootstrap, n_bootstrap_valid, status)#
- classmethod __new__(*args, **kwargs)#