bayespecon.diagnostics.bayesian_lmtests.bayesian_panel_lm_slx_error_joint_test¶
- bayespecon.diagnostics.bayesian_lmtests.bayesian_panel_lm_slx_error_joint_test(model)[source]¶
Bayesian panel joint LM test for SDEM (H₀: λ = 0 AND γ = 0).
Tests the joint null hypothesis that both the spatial error coefficient and the WX coefficients are zero, i.e., whether the OLS panel model should be extended to an SDEM specification.
The null model is OLS panel. The joint score vector is:
\[\begin{split}\mathbf{g} = \begin{pmatrix} \mathbf{e}^\top W \mathbf{e} \\ (WX)^\top \mathbf{e} \end{pmatrix}\end{split}\]The concentration matrix has zero off-diagonal blocks under H₀ (spherical errors):
\[\begin{split}J = \begin{pmatrix} T \cdot \mathrm{tr}(W'W + W^2) & 0 \\ 0 & \frac{1}{\bar{\sigma}^2} (WX)^\top (WX) \end{pmatrix}\end{split}\]The LM statistic is \(\chi^2_{1 + k_{wx}}\) under H₀.
- Parameters:¶
- model : SpatialPanelModel¶
Fitted OLS panel model with
inference_datacontaining posterior draws forbetaandsigma.
- Returns:¶
Dataclass containing LM samples, summary statistics, and metadata. The
dffield is set to \(1 + k_{wx}\).- Return type:¶