bayespecon.diagnostics.lmtests.bayesian_robust_lm_error_sdem_test¶
- bayespecon.diagnostics.lmtests.bayesian_robust_lm_error_sdem_test(model)[source]¶
Bayesian robust LM-Error test in SDEM context (H₀: λ = 0, robust to γ).
Bayesian extension of the robust LM-Error test in the SDEM context ([Koley and Bera, 2024]) using the Doğan, Taşpınar & Bera (2021) framework ([Doğan et al., 2021], Proposition 3).
The alternative model is SDEM (adds \(\lambda\)); the null model is SLX, in which \(\gamma\) is a free parameter and has already been absorbed into the residuals. For each posterior draw of \((\beta, \gamma, \sigma^2)\) from the SLX fit, residuals are \(\mathbf{e} = \mathbf{y} - X\beta - WX\gamma\) and the raw scores are
\[g_\lambda = \mathbf{e}^\top W \mathbf{e}, \qquad g_\rho = \mathbf{e}^\top W \mathbf{y}.\]Under \(H_0\) with spherical errors the cross-block \(V_{\lambda\gamma} = 0\) (odd normal moments vanish, [Koley and Bera, 2024]), so the γ-direction of the Neyman-orthogonal adjustment is a no-op. However the SLX null leaves \(\rho\) unconcentrated: when the true DGP is SDM, the error score \(g_\lambda\) is biased upward. We therefore Schur-correct on \(\rho\) as a second nuisance, using the raw-score variance blocks at the SLX null supplied by
_info_matrix_blocks_slx_robust():\[\begin{split}g_\lambda^* &= g_\lambda - \frac{J_{\rho\lambda}}{J_{\rho\rho}}\, g_\rho \\ V_{\lambda \cdot \rho} &= J_{\lambda\lambda} - \frac{J_{\rho\lambda}^2}{J_{\rho\rho}}.\end{split}\]The per-draw robust LM statistic is
\[\mathrm{LM}_R^{(d)} = \frac{\bigl(g_\lambda^{*\,(d)}\bigr)^2} {V_{\lambda \cdot \rho}} \;\xrightarrow{d}\; \chi^2_1 \quad \text{under } H_0,\]independent of local misspecification in either \(\gamma\) or \(\rho\).