bayespecon.diagnostics.lmtests.bayesian_panel_robust_lm_error_sdem_test

bayespecon.diagnostics.lmtests.bayesian_panel_robust_lm_error_sdem_test(model)[source]

Bayesian panel robust LM-Error in SDEM context (H₀: λ = 0 | SLX panel).

Tests \(H_0: \lambda = 0\) using the SLX panel as the restricted null. The SLX normal equations zero the γ-direction score \((WX)^\top \mathbf{e}_{slx} = \mathbf{0}\) exactly, but leave the other spatial parameter \(\rho\) as a non-trivial nuisance. Following [Doğan et al., 2021] (Proposition 3) we apply the Schur-complement Neyman correction with respect to ρ:

\[\begin{split}g_\lambda^{*\,(d)} &= g_\lambda^{(d)} - (J_{\rho\lambda}/J_{\rho\rho})\, g_\rho^{(d)}, \\ V_{\lambda|\rho} &= J_{\lambda\lambda} - J_{\rho\lambda}^2 / J_{\rho\rho}, \\ \mathrm{LM}^{(d)} &= (g_\lambda^{*\,(d)})^2 / V_{\lambda|\rho} \;\xrightarrow{d}\; \chi^2_1.\end{split}\]

Information blocks (\(J_{\rho\rho}, J_{\lambda\lambda}, J_{\rho\lambda}\)) are computed at the posterior means via _info_matrix_blocks_slx_robust() using \(W_{NT} = I_T \otimes W\) and \(T \cdot T_{WW}\); see bayesian_panel_robust_lm_lag_sdm_test() for the full math block.

Parameters:
model : SLXPanelFE or SLX-like panel model

Fitted SLX panel model with inference_data containing posterior draws for beta and sigma.

Returns:

Per-draw LM samples, summary statistics and df = 1.

Return type:

BayesianLMTestResult