stslshac: Spatial two stages least square with HAC standard errors

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/s2slshac.R

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 ε

where R is a non-stochastic matrix.

Usage

1
2
3
4
stslshac(formula, data = list(), listw,
             na.action = na.fail, zero.policy = NULL, HAC = TRUE,
             distance = NULL, type = "Epanechnikov", 
             bandwidth = "variable", W2X = TRUE)

Arguments

formula

a description of the model to be fit

data

an object of class data.frame. An optional data frame containing the variables in the model.

listw

an object of class listw created for example by nb2listw

na.action

a function which indicates what should happen when the data contains missing values. See lm for details.

zero.policy

See lagsarlm for details

HAC

if FALSE traditional standard errors are provided.

distance

an object of class distance created for example by read.gwt2dist The object contains the specification of the distance measure to be employed in the estimation of the VC matrix. See Details.

type

One of c("Epanechnikov","Triangular","Bisquare","Parzen", "QS","TH"). The type of Kernel to be used. See Details.

bandwidth

"variable" (default) - or numeric when a fixed bandwidth is specified by the user.

W2X

default TRUE. if FALSE only WX are used as instruments in the spatial two stage least squares.

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:

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].

Value

A list object of class sphet

coefficients

Spatial two stage least squares coefficient estimates

vcmat

variance-covariance matrix of the estimated coefficients

s2

S2sls residulas variance

residuals

S2sls residuals

yhat

difference between residuals and response variable

call

the call used to create this object

model

the model matrix of data

type

the kernel employed in the estimation

bandwidth

the type of bandwidth

method

's2slshac'

Author(s)

Gianfranco Piras gpiras@mac.com

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

1
2
3
4
5
6
7
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)

sphet documentation built on Jan. 6, 2022, 1:06 a.m.