moderndid.compute_vlo_vup_dual#
- moderndid.compute_vlo_vup_dual(eta, s_t, gamma_tilde, sigma, w_t)[source]#
Compute the truncation bounds for the test statistic using dual approach with bisection.
Computes the truncation bounds for the test statistic \(\tilde{\gamma}'Y\) under the conditional distribution using the dual formulation. The bounds \([v_{lo}, v_{up}]\) are determined by the requirement that \(\tilde{\gamma}\) remains the optimal dual solution.
The method uses a hybrid approach that first attempts a shortcut based on the first-order optimality conditions, then falls back to bisection if needed. The shortcut exploits the fact that at the boundary \(v = v_{lo}\) or \(v = v_{up}\), a new constraint becomes binding, allowing direct computation in many cases.
- Parameters:
- eta
float Optimal value \(\eta^*\) from the linear program.
- s_t
numpy.ndarray Residual vector \(s = (I - b\gamma')Y\) where \(b = \Sigma\gamma/(\gamma'\Sigma\gamma)\).
- gamma_tilde
numpy.ndarray Normalized dual solution \(\tilde{\gamma}\) with \(\sum_i \tilde{\gamma}_i = 1\).
- sigma
numpy.ndarray Covariance matrix \(\Sigma_Y\).
- w_t
numpy.ndarray Constraint matrix \(W = [\text{diag}(\sigma)^{1/2}, X_T]\).
- eta
- Returns:
dictDictionary with:
vlo: float, lower bound of conditional support
vup: float, upper bound of conditional support
Notes
The bounds are found by solving \(\max_{\lambda \geq 0} \lambda's\) subject to \(W'\lambda = e_1\) and \(\lambda'\mathbf{1} = 1\), where \(e_1\) is the first standard basis vector. The value \(v\) where this maximum equals \(v\) itself determines the boundary of the support.
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.