bayespecon.diagnostics.bayesian_lmtests.bayesian_panel_lm_sdm_joint_test¶
- bayespecon.diagnostics.bayesian_lmtests.bayesian_panel_lm_sdm_joint_test(model)[source]¶
Bayesian panel joint LM test for SDM (H₀: ρ = 0 AND γ = 0).
Tests the joint null hypothesis that both the spatial lag coefficient and the WX coefficients are zero, i.e., whether the OLS panel model should be extended to an SDM specification.
The null model is OLS panel. The joint score vector is:
\[\begin{split}\mathbf{g} = \begin{pmatrix} \mathbf{e}^\top W \mathbf{y} \\ (WX)^\top \mathbf{e} \end{pmatrix}\end{split}\]a \((1 + k_{wx}) \times 1\) vector for each draw. The concentration matrix uses panel-adjusted J_{ρρ}:
\[\begin{split}J = \begin{pmatrix} J_{\rho\rho} & J_{\rho\gamma} \\ J_{\gamma\rho} & J_{\gamma\gamma} \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:¶