Learn R Programming

spdep (version 0.5-74)

sacsarlm: Spatial simultaneous autoregressive SAC model estimation

Description

Maximum likelihood estimation of spatial simultaneous autoregressive SAC/SARAR models of the form:

$$y = \rho W1 y + X \beta + u, u = \lambda W2 u + \varepsilon$$

where $\rho$ and $\lambda$ are found by nlminb or optim() first, and $\beta$ and other parameters by generalized least squares subsequently

Usage

sacsarlm(formula, data = list(), listw, listw2 = NULL, na.action, type="sac",
 method = "eigen", quiet = NULL, zero.policy = NULL, tol.solve = 1e-10,
 llprof=NULL, interval1=NULL, interval2=NULL, trs1=NULL, trs2=NULL,
 control = list())

Arguments

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
listw2
a listw object created for example by nb2listw, if not given, set to the same spatial weights as the listw argument
na.action
a function (default options("na.action")), can also be na.omit or na.exclude with consequences for residuals and fitted values - in these cases the weights list will be subsetted to remove NAs in the data. It may be
type
default "sac", may be set to "sacmixed" for the Manski model to include the spatially lagged independent variables added to X using listw; when "sacmixed", the lagged intercept is dropped for spatial weights style "W", that is row-standardise
method
"eigen" (default) - the Jacobian is computed as the product of (1 - rho*eigenvalue) using eigenw, and "spam" or "Matrix" for strictly symmetric weights lists of styles "B" and "C", or made symmetric by similarity (Ord, 1975, Appendix C) if p
quiet
default NULL, use !verbose global option value; if FALSE, reports function values during optimization.
zero.policy
default NULL, use global option value; if TRUE assign zero to the lagged value of zones without neighbours, if FALSE (default) assign NA - causing sacsarlm() 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-10). This may be used if necessary to extract coefficient standard errors (for instance lowering to 1e-12), but errors
llprof
default NULL, can either be an integer, to divide the feasible ranges into a grid of points, or a two-column matrix of spatial coefficient values, at which to evaluate the likelihood function
trs1, trs2
default NULL, if given, vectors for each weights object of powered spatial weights matrix traces output by trW; when given, used in some Jacobian methods
interval1, interval2
default is NULL, search intervals for each weights object for autoregressive parameters
control
list of extra control arguments - see section below

Value

  • A list object of class sarlm
  • typesac
  • rholag simultaneous autoregressive lag coefficient
  • lambdaerror simultaneous autoregressive error coefficient
  • coefficientsGLS coefficient estimates
  • rest.seasymptotic standard errors if ase=TRUE, otherwise approximate numeriacal Hessian-based values
  • aseTRUE if method=eigen
  • LLlog likelihood value at computed optimum
  • s2GLS residual variance
  • SSEsum of squared GLS errors
  • parametersnumber of parameters estimated
  • logLik_lm.modelLog likelihood of the non-spatial linear model
  • AIC_lm.modelAIC of the non-spatial linear model
  • methodthe method used to calculate the Jacobian
  • callthe call used to create this object
  • residualsGLS residuals
  • tarXmodel matrix of the GLS model
  • taryresponse of the GLS model
  • yresponse of the linear model for $\rho=0$
  • Xmodel matrix of the linear model for $\rho=0$
  • optobject returned from numerical optimisation
  • parsstarting parameter values for final optimization, either given or found by trial point evaluation
  • mxsif default input pars, optimal objective function values at trial points
  • fitted.valuesDifference between residuals and response variable
  • se.fitNot used yet
  • rho.seif ase=TRUE, the asymptotic standard error of $\rho$, otherwise approximate numeriacal Hessian-based value
  • lambda.seif ase=TRUE, the asymptotic standard error of $\lambda$
  • resvarthe asymptotic coefficient covariance matrix for (s2, rho, lambda, B)
  • zero.policyzero.policy for this model
  • aliasedthe aliased explanatory variables (if any)
  • LLNullLlmLog-likelihood of the null linear model
  • fdHessthe numerical Hessian-based coefficient covariance matrix for (rho, lambda, B) if computed
  • resvarasymptotic coefficient covariance matrix
  • optimHessFALSE
  • timingsprocessing timings
  • na.action(possibly) named vector of excluded or omitted observations if non-default na.action argument used

Details

Because numerical optimisation is used to find the values of lambda and rho, care needs to be shown. It has been found that the surface of the 2D likelihood function often forms a banana trench from (low rho, high lambda) through (high rho, high lambda) to (high rho, low lambda) values. In addition, sometimes the banana has optima towards both ends, one local, the other global, and conseqently the choice of the starting point for the final optimization becomes crucial. The default approach is not to use just (0, 0) as a starting point, nor the (rho, lambda) values from gstsls, which lie in a central part of the trench, but either four values at (low rho, high lambda), (0, 0), (high rho, high lambda), and (high rho, low lambda), and to use the best of these start points for the final optimization. Optionally, nine points can be used spanning the whole (lower, upper) space.

References

Anselin, L. 1988 Spatial econometrics: methods and models. (Dordrecht: Kluwer); LeSage J and RK Pace (2009) Introduction to Spatial Econometrics. CRC Press, Boca Raton

See Also

lm, lagsarlm, errorsarlm, summary.sarlm, eigenw, impacts.sarlm

Examples

Run this code
data(oldcol)
COL.sacW.eig <- sacsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, 
 nb2listw(COL.nb, style="W"))
summary(COL.sacW.eig, correlation=TRUE)
W <- as(as_dgRMatrix_listw(nb2listw(COL.nb, style="W")), "CsparseMatrix")
trMatc <- trW(W, type="mult")
summary(impacts(COL.sacW.eig, tr=trMatc, R=2000), zstats=TRUE, short=TRUE)
COL.msacW.eig <- sacsarlm(CRIME ~ INC + HOVAL, data=COL.OLD, 
 nb2listw(COL.nb, style="W"), type="sacmixed")
summary(COL.msacW.eig, correlation=TRUE)
summary(impacts(COL.msacW.eig, tr=trMatc, R=2000), zstats=TRUE, short=TRUE)

Run the code above in your browser using DataLab