bayespecon.diagnostics.lmtests.bayesian_panel_lm_error_sdm_test¶
- bayespecon.diagnostics.lmtests.bayesian_panel_lm_error_sdm_test(model)[source]¶
Panel LM-Error test from an SDM panel posterior (H₀: λ = 0 | SDM).
Panel analogue of
bayesian_lm_error_sdm_test(). Residuals are computed from the SDM panel mean structure, including \(\rho\,(I_T \otimes W)\mathbf{y}\) and (for RE) the unit-level random effect:\[\mathbf{e} = \mathbf{y} - \rho\,(I_T\otimes W)\mathbf{y} - X\beta - WX\gamma - (\iota_T \otimes \alpha).\]The score and variance follow the panel LM-Error construction (cf.
bayesian_panel_lm_error_test()), kept on the raw-score scale:\[S = \mathbf{e}^\top (I_T \otimes W)\mathbf{e}, \qquad V = \bar{\sigma}^4 \cdot T \cdot T_{WW},\]with \(T_{WW} = \mathrm{tr}(W^\top W + W^2)\). The LM statistic is \(\chi^2_1\) under H₀. Tests whether an SDM panel should be extended to a SDARAR panel (SDM with spatial-error autocorrelation); this is the panel analogue of the SDM-aware diagnostic discussed in Koley and Bera [2024]. Panel-data extensions follow Anselin et al. [2008] and Elhorst [2014]. The Bayesian LM statistic is computed per posterior draw following Doğan et al. [2021].