Fit a Spatial Linear Model (Generalized Least Squares)

DESCRIPTION:

Fits a spatial linear model (generalized least squares), returning the bare minimum computations.

USAGE:

slm.fit.spatial(x, y, cov.family, initial, spatial.arglist=NULL, 
                start=NULL, ...) 

REQUIRED ARGUMENTS:

x, y
numeric vectors or matrices for the predictors and the response in a linear model. Typically, but not necessarily, x will be the model matrix generated by one of the fitting functions. Note that missing values are not allowed.
cov.family
the spatial covariance family to be fit. Valid values are: CAR (conditional auto-regression), SAR (simultaneous auto-regression), or MA (moving average). These are S-PLUS objects containing functions required by the slm fitting algorithm. The covariance model is defined by argument cov.family and is further defined by the variables listed in argument spatial.arglist.
initial
a list containing the quantities returned by the cov.family$initialize function, e.g.,

initial < - `cov.family$initialize(spatial.arglist, subset)'

spatial.arglist
a list containing arguments required by (and further defining) the spatial model as specified by argument cov.family. Instead of entering these arguments individually, spatial.arglist is used to allow the algorithms to be generalized to different kinds of models. For all of the models currently fit by slm, the spatial.arglist argument contains the following variables:

REQUIRED

neighbor - an object of class "spatial.neighbor" containing the neighbors and weights to be used when defining the model covariance (see spatial.neighbor).

OPTIONAL

region.id - when argument subset is given and rows have been removed from the neighbor object, variable region.id must be used to give the rows currently available in the spatial neighbor object. This is described below in the DETAILS section. Also see the help file for spatial.subset.

weights - the cov.family uses the neighbor argument to determine a covariance matrix for the residuals. It is possible to specify a vector of observation weights to be included in the covariance matrix. Let D denote the diagonal weight matrix, and let S denote the part of the covariance matrix estimate which is based on the neighbor variable in argument spatial.arglist. Then if weights are specified, the residual covariance matrix is computed as matrix expression:

sqrt(D) * S * sqrt(D).



start - vector of starting values for the optimization algorithm.

print.level - if TRUE, then the function evaluations are printed as the optimization algorithm proceeds. This can be quite useful for checking on convergence of the algorithm to the maximum likelihood estimates.

start
the initial starting value of the parameters, which is a vector with length equal to the number of weight matrices represented by argument neighbor. If it is not specified, the default starting value in spatial.arglist will be used. If that is also not provided nor valid, an initialization procedure will be called to determine the starting value of the parameters.
...
Additional arguments which can be passed to the function slm.nlminb and which effect the iterative estimation algorithm. In particular, various algorithmic control values can be passed, along with the lower and upper bounds of the parameters.

VALUE:

A list of class "slm". For a description of the contents of the class, see the top level routine, function slm.

SEE ALSO:

, .