bayespecon.diagnostics.bayesian_lmtests.bayesian_panel_robust_lm_wx_test¶
- bayespecon.diagnostics.bayesian_lmtests.bayesian_panel_robust_lm_wx_test(model)[source]¶
Bayesian panel robust LM-WX test (H₀: γ = 0, robust to ρ).
Tests the null hypothesis that the WX coefficients are zero, robust to the local presence of a spatial lag (ρ). Uses the Neyman orthogonal score adjustment from Doğan et al. [2021], Proposition 3.
The alternative model is SAR panel (includes ρ but not γ). For each posterior draw from the SAR model, residuals are:
\[\mathbf{e} = \mathbf{y} - \rho W \mathbf{y} - X\beta\]The Neyman-adjusted score for γ is:
\[\boldsymbol{g}_\gamma^* = \boldsymbol{g}_\gamma - J_{\gamma\rho \cdot \sigma} J_{\rho\rho \cdot \sigma}^{-1} g_\rho\]The robust LM statistic is \(\chi^2_{k_{wx}}\) under H₀.
- Parameters:¶
- model : SARPanelFE or SARPanelRE¶
Fitted SAR panel model with
inference_datacontaining posterior draws forbeta,rho, andsigma.
- Returns:¶
Dataclass containing LM samples, summary statistics, and metadata.
- Return type:¶