cov.family
containing functions for
fitting conditional autoregression models when used as input to the
spatial linear models function,
slm
. See
cov.family.object
for a discussion of the attributes contained in the
CAR
object. The
discussion here centers around the covariance matrix model which the
CAR
object supports.
Let
N
denote a neighbor matrix obtained from an object of class
"spatial.neighbor"
, and let
S
denote the covariance matrix of a
vector
y
of spatially correlated dependent variables. Finally, let
W
denote a diagonal matrix of weights. Then a conditional
autoregression model assumes that
S = (I - rho N)^(-1)*W*sigma^2
where
rho
and and
sigma
are scale parameters to be estimated.
Here
^
is the exponentiation operator.
This model for the covariance matrix can be generalized to
multiple matrices
N[i]
using multiple parameters
rho[i]
as follows:
S = (sum (I - rho[i] N[i]))^(-1)*W*sigma^2
where the
N[i]
are specified through component
matrix
of the
"spatial.neighbor"
object (see routine
spatial.neighbor
).
The "regression" aspect of a spatial regression fits the multivariate
normal mean vector
mu = E(y|x) = x*beta
for unknown parameters
beta
. The multivariate normal likelihood is
expressed in terms of the unknowns
rho
,
sigma
, and
beta
. The
CAR
object assumes that a profile likelihood for
rho
is fit.
The CAR model can be expressed as an autoregressive model for the
spatial parameters as follows:
y = X*beta + rho*N (y - X*beta) + (W^1/2)*epsilon
For the CAR model, the residuals,
epsilon
, defined here are not
independent. The formula for
y
allows one to decompose the sum of
squares in
y
into three components (see Haining, 1990, page 258): 1)
the trend,
X*beta
; 2) the noise, (W^1/2)*epsilon = (I - rho*N)(y
- X*beta); and 3) the signal,
y - X*beta - (W^1/2)*epsilon
.
Function
residual.fun
of the
CAR
object computes
epsilon
, the
standardized residuals, and routine
slm
returns these in component
residuals
. The estimated trend, is returned by routine
slm
as the fitted values.
Two functions are required to compute the profile likelihood: 1) a
function for computing the determinant `|S|', and 2) a function for
computing the vector
S^(-1) z
for arbitrary vector
z
. When the
single neighbor matrix
N
is symmetric, the determinant can be
expressed and efficiently computed as a function of the eigenvalues of
N
. If
N
is not symmetric, or if the dimension of
N
is large
(over 150), then sparse matrix routines by Kundert (1988) are used to
compute the determinant of
S
. Because the covariance
matrix is parameterized in terms of its inverse, the computation of
S^(-1) z
is simple and is carried out using (sparse)
matrix multiplication. See routine
spatial.multiply
.
Haining, R. (1990).
Spatial Data Analysis in the Social and Environmental Sciences.
Cambridge University Press. Cambridge.
Kundert, Kenneth S. and Sangiovanni-Vincentelli, Alberto (1988).
A Sparse Linear Equation Solver.
Department of EE and CS, University of California, Berkeley.