bayespecon.diagnostics.lmtests.bayesian_lm_flow_joint_test

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

Joint Bayesian LM test for the SARFlow filter (\(H_0\colon \rho_d = \rho_o = \rho_w = 0\)).

For each posterior draw \(g\) of the OLSFlow null, builds the score vector \(g_g = ((W_d y)^\top e_g, (W_o y)^\top e_g, (W_w y)^\top e_g)^\top\) and the information matrix

\[J = T_{\text{flow}}\,\bar\sigma^{2} + Q, \qquad Q_{ij} = (W_i y)^\top (W_j y),\]

where \(T_{\text{flow}}\) is the cached \(3\times 3\) Kronecker trace matrix from bayespecon.graph.flow_trace_blocks(). The statistic is \(LM_g = g_g^\top J^{-1} g_g\), distributed \(\chi^{2}_3\) under \(H_0\). The 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].