moderndid.test_in_identified_set_flci_hybrid#

moderndid.test_in_identified_set_flci_hybrid(y, sigma, A, d, alpha, hybrid_kappa, flci_halflength, flci_l, **kwargs)[source]#

Hybrid test combining fixed-length confidence interval (FLCI) constraints with ARP conditional test.

Implements a two-stage hybrid test following the general structure described in Section 3.2 of [2]. The first stage checks whether the FLCI constraints \(|\ell' Y| \leq h_{FLCI}\) are satisfied, where \(\ell\) is an optimally chosen weight vector and \(h_{FLCI}\) is the FLCI half-length. If these constraints are violated (i.e., if \(|\ell' Y| > h_{FLCI}\)), the test rejects immediately with size \(\kappa\).

If the first stage does not reject, the second stage proceeds with a modified conditional test that includes the FLCI constraints in the constraint set. Following the hybrid approach, the second stage uses adjusted size \(\tilde{\alpha} = \frac{\alpha - \kappa}{1 - \kappa}\) to ensure overall size \(\alpha\) control.

The FLCI constraints \(|\ell' Y| \leq h_{FLCI}\) are reformulated as two linear inequalities: \(\ell' Y \leq h_{FLCI}\) and \(-\ell' Y \leq h_{FLCI}\), which are added to the original constraint set \(\Delta = \{\delta : A\delta \leq d\}\) for the second stage test.

Parameters:
ynumpy.ndarray

Observed coefficient vector \(Y = \hat{\beta} - \theta_0 e_{post,s}\).

sigmanumpy.ndarray

Covariance matrix \(\Sigma\).

Anumpy.ndarray

Constraint matrix \(A\) for main restrictions.

dnumpy.ndarray

Constraint bounds \(d\).

alphafloat

Overall significance level \(\alpha\).

hybrid_kappafloat

First-stage significance level \(\kappa\).

flci_halflengthfloat

Half-length \(h_{FLCI}\) of the fixed-length confidence interval.

flci_lnumpy.ndarray

Weight vector \(\ell\) from FLCI optimization.

**kwargs

Unused parameters for compatibility.

Returns:
bool

True if null is NOT rejected (value is in identified set).

Notes

The FLCI hybrid leverages the optimal linear combination \(\ell\) found by minimizing worst-case CI length. This often provides tighter bounds than the least favorable approach, especially when \(\Delta\) has special structure like smoothness restrictions.

References

[1]

Andrews, I., Roth, J., & Pakes, A. (2023). Inference for Linear Conditional Moment Inequalities. Review of Economic Studies.

[2]

Rambachan, A., & Roth, J. (2023). A more credible approach to parallel trends. Review of Economic Studies, 90(5), 2555-2591.