bayespecon.diagnostics.lmtests.bayesian_lm_flow_dest_test

bayespecon.diagnostics.lmtests.bayesian_lm_flow_dest_test(model)[source]

Bayesian LM test for an omitted destination-side spatial lag.

Tests \(H_0\colon \rho_d = 0\) against the SARFlow alternative, using a fitted OLSFlow as the null model. For each posterior draw \(g\) the residual is \(e_g = y - X \beta_g\); the score is \(s_g = (W_d y)^\top e_g\) and the information-matrix denominator is

\[V = \operatorname{tr}(W_d^\top W_d + W_d^2)\,\bar\sigma^{2} + \|W_d y\|^{2},\]

with \(\bar\sigma^{2}\) the posterior mean of \(\sigma^{2}\). The Bayesian p-value is \(1 - F_{\chi^{2}_{1}}(\overline{LM})\).

The score / information construction follows the gravity-flow spatial-econometrics framework of LeSage and Pace [2008] and LeSage and Pace [2009]. The Bayesian LM statistic is computed per posterior draw following Doğan et al. [2021].