neighbayes.diagnostics.lmtests.bayesian_glm_moran_working_test¶
- neighbayes.diagnostics.lmtests.bayesian_glm_moran_working_test(model)[source]¶
Moran diagnostic on the working residuals at the GLM null.
With \(\tilde e = \tilde z - X\beta\) the working residual and \(\Omega\) its weights (
_glm: the PG mean weights of the logit and NB, the probit’s Fisher weights),\[S^{(d)} = \tilde e^{(d)\top}\, \Omega^{(d)}\, W\, \tilde e^{(d)}, \qquad V = \mathrm{tr}(W^2) + \sum_{i,j} \bar\omega_i/\bar\omega_j\, W_{ij}^2,\]the exact null variance of the statistic given the weights. It pairs the score residual with the working residual, where the latent SEM’s score pairs it with the predicted disturbance, so it is a residual diagnostic, not the score test of a fitted model (
LM-Erroris that).