Learn R Programming

sphet (version 1.5)

stslshac: Spatial two stages least square with HAC standard errors

Description

Non-parametric heteroskedasticity and autocorrelation consistent (HAC) estimator of the variance-covariance (VC) for a vector of sample moments within a spatial context. The disturbance vector is generated as follows: $$u = R \epsilon$$ where $R$ is a non-stochastic matrix.

Usage

stslshac(formula, data=list(),listw,na.action=na.fail,zero.policy=NULL, HAC=TRUE, 
distance=NULL,type=c("Epanechnikov","Triangular","Bisquare","Parzen", "QS","TH"), 
bandwidth="variable",W2X=TRUE)

Arguments

Value

A list object of class sphetcoefficientsSpatial two stage least squares coefficient estimatesvcmatvariance-covariance matrix of the estimated coefficientss2S2sls residulas varianceresidualsS2sls residualsyhatdifference between residuals and response variablecallthe call used to create this objectmodelthe model matrix of datatypethe kernel employed in the estimationbandwidththe type of bandwidthmethod's2slshac'

Details

The default sets the bandwith for each observation to the maximum distance for that observation (i.e. the max of each element of the list of distances).

Six different kernel functions are implemented:

  • 'Epanechnikov':$K(z) = 1-z^2$
  • 'Triangular':$K(z) = 1-z$
  • 'Bisquare':$K(z) = (1-z^2)^2$
  • 'Parzen':$K(z) = 1-6z^2+6 |z|^3$if$z \leq 0.5$and$K(z) = 2(1-|z|)^3$if$0.5 < z \leq 1$
  • 'TH'(Tukey - Hanning):$K(z) = \frac{1+ \cos(\pi z)}{2}$
  • 'QS'(Quadratic Spectral):$K(z) = \frac{25}{12\pi^2z^2} (\frac{\sin(6\pi z)/5)}{6\pi z/5} - \cos(6\pi z)/5)$).

If the kernel type is not one of the six implemented, the function will terminate with an error message. The spatial two stage least square estimator is based on the matrix of instruments $H=[X,WX,W^2X^2]$.

References

Kelejian, H.H. and Prucha, I.R. (2007) HAC estimation in a spatial framework, Journal of Econometrics, 140, pages 131--154.

Kelejian, H.H. and Prucha, I.R. (1999) A Generalized Moments Estimator for the Autoregressive Parameter in a Spatial Model, International Economic Review, 40, pages 509--533. Kelejian, H.H. and Prucha, I.R. (1998) A Generalized Spatial Two Stage Least Square Procedure for Estimating a Spatial Autoregressive Model with Autoregressive Disturbances, Journal of Real Estate Finance and Economics, 17, pages 99--121.

See Also

gstslshet, distance, distance

Examples

Run this code
library(spdep)
data(columbus)
listw<-nb2listw(col.gal.nb)
data(coldis)
res<-stslshac(CRIME~HOVAL + INC, data=columbus,listw=listw,  distance=coldis, type='Triangular')
summary(res)

Run the code above in your browser using DataLab