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
MA
object. The
discussion here centers around the covariance matrix model which the
MA
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 moving average spatial
regression model assumes that
S = (I + rho N) W ((I + rho N)^t sigma^2
where
rho
is a scalar parameter to be estimated, and
sigma
is a
scale parameter which is also 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])) W (sum (I + rho[i] N[i])^t 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
MA
object assumes that a profile likelihood for
rho
is fit.
The MA model can be expressed as a moving average model for the
spatial parameters as follows:
y = X*beta + rho*N*W^(1/2)*epsilon + W^(1/2)*epsilon
This 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
MA
object computes
epsilon
, the standardized residuals, and
routine
slm
returns these in component
residuals
. The estimated
trend,
X beta
, 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 weight 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 too large
(over 150), then sparse matrix routines by Kundert (1988) are used to compute
the determinant of
S
. Unlike the
SAR
,
CAR
, and other spatial regression
models, for moving average models the covariance matrix is not parameterized
in terms of its inverse. The matrix
N
will usually be sparse, however,
so
S^(-1) z
can be efficiently computed using the Kundert (1988) algorithms.
See routine
spatial.cg.solve
for details.
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.