lagsarlm
Lagsarlm is a function in the R package spdep used to estimate spatial autoregressive models that include a spatially lagged dependent variable. It implements the SAR (spatial autoregressive) model where the dependent variable is influenced by its neighbors: y = ρ Wy + Xβ + ε, with y the observed vector, W the spatial weights matrix, ρ the spatial lag parameter, X a matrix of covariates, β the regression coefficients, and ε an error term typically assumed to be normally distributed with variance σ².
The function requires a data frame and a specification of the spatial structure, usually provided via a
Estimation is typically performed by maximum likelihood under standard normal errors, jointly estimating ρ and β (as well
Output from lagsarlm includes the estimated coefficients for X (β) and the spatial lag parameter (ρ), along with
Related functions in spdep include errorsarlm for spatial error models and related tools for diagnostics, prediction,