lm.LMtests(model, listw, zero.policy=FALSE, test="LMerr", spChk=NULL)
print.LMtestlist(x, ...)
lm
returned by lm
; weights
and offsets should not be usedlistw
object created for example by nb2listw
,
expected to be row-standardised (W-style)get.spChkOption()
$$\mathbf{y} = \mathbf{X \beta} + \rho \mathbf{W_{(1)} y} + \mathbf{u},$$ $$\mathbf{u} = \lambda \mathbf{W_{(2)} u} + \mathbf{e}$$
where $\mathbf{e}$ is a well-behaved, uncorrelated error term. Tests for a missing spatially lagged dependent variable test that $\rho = 0$, tests for spatial autocorrelation of the error $\mathbf{u}$ test whether $\lambda = 0$. $\mathbf{W}$ is a spatial weights matrix; for the tests used here they are identical.
LMtestlist
of htest
objects, each with: