neighbayes.diagnostics.lmtests.bayesian_glm_lm_wx_test

neighbayes.diagnostics.lmtests.bayesian_glm_lm_wx_test(model)[source]

Bayesian LM test for omitted WX coefficients in a GLM (H₀: γ = 0).

PG-augmented analog of bayesian_lm_wx_test(). Tests whether spatially lagged covariates \(WX\) should be added to the GLM mean. The score in the weighted pseudo-regression is

\[\mathbf{g}_\gamma^{(d)} = (WX)^\top \Omega^{(d)} \tilde e^{(d)},\]

with variance under H₀

\[V_{\gamma\gamma} = (WX)^\top \bar\Omega\, M_X^{\bar\Omega}\, (WX) = (WX)^\top \bar\Omega (WX) - (WX)^\top \bar\Omega X (X^\top \bar\Omega X)^{-1} X^\top \bar\Omega (WX).\]

Reduces to the spreg lm_wx formula when \(\bar\Omega = \sigma^{-2} I\).

Returns:

Per-draw LM samples, summary statistics, df = k_{wx}.

Return type:

BayesianLMTestResult