Learn R Programming

spdep (version 0.1-2)

errorsarlm: Spatial simultaneous autoregressive error model estimation

Description

Maximum likelihood estimation of spatial simultaneous autoregressive error models of the form:

$$y = X \beta + u, u = \lambda W u + \varepsilon$$

where $$ is found by optimize() first and $$ and other parameters by generalized least squares subsequently. errorsarlm(formula, data=list(), listw, method="eigen", quiet=TRUE, zero.policy=FALSE, tol.solve=1.0e-7, tol.opt=.Machine$double.eps^0.5) sar.error.f(lambda, eig, y, wy, x, WX, n, quiet) sar.error.f.s(lambda, sn, y, wy, x, WX, n, quiet)formula{a symbolic description of the model to be fit. The details of model specification are given for lm()} data{an optional data frame containing the variables in the model. By default the variables are taken from the environment which the function is called.} listw{a listw object created for example by nb2listw} method{"eigen" (default) - the Jacobian is computed as the product of (1 - rho*eigenvalue) using eigenw , and "sparse" - computes the determinant of the sparse matrix (I - rho*W) directly using log.spwdet. } quiet{default=TRUE; if FALSE, reports function values during optimization.} zero.policy{if TRUE assign zero to the lagged value of zones without neighbours, if FALSE (default) assign NA - causing errorsarlm() to terminate with an error} tol.solve{the tolerance for detecting linear dependencies in the columns of matrices to be inverted - passed to solve() (default=1.0e-7)} tol.opt{the desired accuracy of the optimization - passed to optimize() (default=square root of double precision machine tolerance)} lambda{value of the spatial parameter} eig{eigenvalues of the full spatial weights matrix from eigenw} y{dependent variable} wy{spatially lagged dependent variable} x{independent variables} WX{spatially lagged independent variables} n{length of y (and eig)} sn{sparse spatial neighbour object from listw2sn}

The asymptotic standard error of $$ is only computed when method=eigen, because the full matrix operations involved would be costly for large n typically associated with the choice of method=sparse. A list object of class sarlm type{"error"} lambda{simultaneous autoregressive error coefficient} coefficients{GLS coefficient estimates} rest.se{GLS coefficient standard errors (are equal to asymptotic standard errors)} LL{log likelihood value at computed optimum} s2{GLS residual variance} SSE{sum of squared GLS errors} parameters{number of parameters estimated} lm.model{the lm object returned when estimating for $=0$ method{the method used to calculate the Jacobian} call{the call used to create this object} residuals{GLS residuals} lm.target{the lm object returned for the GLS fit} fitted.values{GLS fitted values} ase{TRUE if method=eigen} se.fit{The GLS standard errors of the fitted values (not taking into account the standard error of $$) lambda.se{if ase=TRUE, the asymptotic standard error of $$ LMtest{NULL for this model} zero.policy{zero.policy for this model}

The sar.error.* functions return the value of the log likelihood function at $$. Cliff, A. D., Ord, J. K. 1981 Spatial processes, Pion; Ord, J. K. 1975 Estimation methods for models of spatial interaction, Journal of the American Statistical Association, 70, 120-126; Anselin, L. 1988 Spatial econometrics: methods and models. (Dordrecht: Kluwer); Anselin, L. 1995 SpaceStat, a software program for the analysis of spatial data, version 1.80. Regional Research Institute, West Virginia University, Morgantown, WV (www.spacestat.com); Anselin L, Bera AK (1998) Spatial dependence in linear regression models with an introduction to spatial econometrics. In: Ullah A, Giles DEA (eds) Handbook of applied economic statistics. Marcel Dekker, New York, pp. 237-289. [object Object],[object Object],[object Object]

lm, lagsarlm, eigenw, log.spwdet

data(oldcol) COL.err.eig <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, nb2listw(COL.nb), method="eigen", quiet=FALSE) COL.err.sp <- errorsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, nb2listw(COL.nb), method="sparse", quiet=FALSE) summary(COL.err.eig) summary(COL.err.sp) spatial

Arguments