moderndid.compute_identified_set_sdrmm#
- moderndid.compute_identified_set_sdrmm(m_bar, true_beta, l_vec, num_pre_periods, num_post_periods, monotonicity_direction='increasing')[source]#
Compute identified set for \(\Delta^{SDRMM}(\bar{M})\).
Computes the identified set for \(l'\tau_{post}\) under the restriction that the underlying trend delta lies in \(\Delta^{SDRMM}(\bar{M})\).
This set combines the second-differences-with-relative-magnitudes constraint with a monotonicity constraint, as discussed in Section 2.4.4 of [1]. The identified set is the union of identified sets for each component polyhedron,
\[\mathcal{S}(\beta, \Delta^{SDRMM}(\bar{M})) = \bigcup_{s<0, sign \in \{+,-\}} \mathcal{S}(\beta, \Delta^{SDRM}_{s,sign}(\bar{M}) \cap \Delta^{Mon})\]where each component set is computed by solving linear programs to find the range of \(l'\tau_{post}\) consistent with the constraints.
- Parameters:
- m_bar
float Relative magnitude parameter. Second differences in post-treatment periods can be at most \(\bar{M}\) times the maximum absolute second difference in pre-treatment periods.
- true_beta
numpy.ndarray True coefficient values (pre and post periods).
- l_vec
numpy.ndarray Vector defining parameter of interest \(\theta = l'\tau_{post}\).
- num_pre_periods
int Number of pre-treatment periods.
- num_post_periods
int Number of post-treatment periods.
- monotonicity_direction{‘increasing’, ‘decreasing’}, default=’increasing’
Direction of monotonicity restriction.
- m_bar
- Returns:
DeltaSDRMMResultLower and upper bounds of the identified set.
Notes
The identified set is computed by solving linear programs for each choice of period \(s \in \{-(T_{pre}-2), ..., 0\}\) and sign (positive/negative maximum), then taking the union of all resulting intervals. The monotonicity constraint is enforced in each linear program, ensuring that treatment effects are either non-decreasing or non-increasing over time.
The linear programs solve for the maximum and minimum of \(l'\delta_{post}\) subject to constraints including \(\delta_{pre} = \beta_{pre}\) and \(\delta \in \Delta^{SDRM}_{s,sign}(\bar{M}) \cap \Delta^{Mon}\).
References
[1]Rambachan, A., & Roth, J. (2023). A more credible approach to parallel trends. Review of Economic Studies, 90(5), 2555-2591.