Home

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,

spatial
weights
object
(commonly
named
listw)
or
an
explicit
W
matrix.
Users
supply
a
formula
describing
the
dependent
variable
and
covariates,
plus
the
data
and
the
spatial
weights.
Options
such
as
zero.policy
control
whether
observations
with
no
neighbors
are
included,
and
na.action
handles
missing
values.
as
σ²).
The
likelihood
is
constructed
to
account
for
the
endogeneity
introduced
by
Wy,
and
the
estimation
yields
parameter
estimates,
standard
errors,
and
model
fit
statistics.
The
process
can
involve
iterative
optimization
and
may
leverage
different
computational
routines
available
within
spdep.
standard
errors
and
test
statistics.
It
also
provides
model
diagnostics
such
as
log-likelihood,
AIC,
BIC,
fitted
values,
and
residuals.
The
results
support
interpretation
of
both
covariate
effects
and
the
strength
and
direction
of
spatial
dependence
in
the
dependent
variable.
and
hypothesis
testing
in
spatial
econometric
models.