
Spatial lag, spatial error and SAC models by maximum likelihood
Source:R/SpatialRegressionML.R
SpatialRegressionML.Rdlag: \(y = \rho W y + X\beta + e\); error: \(y =
X\beta + u\), \(u = \lambda W u + e\); sac: both. Profiling
\(\beta\) and \(\sigma^2\) leaves \(-2\log L = n\log(2\pi\sigma^2)
+ n - 2\log|I - \rho W| - 2\log|I - \lambda W|\), maximised by
stats::optimize (lag, error) or by alternating one-dimensional
searches (SAC); log-determinants by LU decomposition. Standard errors:
the analytic information matrix for lag and error (Ord 1975; Anselin
1988), a central-difference Hessian of the full log-likelihood for SAC.
These match spatialreg::lagsarlm, errorsarlm and
sacsarlm with method = "LU".