spreg {sphet}R Documentation

GM estimation of a Cliff-Ord type model with Heteroskedastic Innovations

Description

Multi step GM/IV estimation of a linear Cliff and Ord -type of model of the form:

y=\lambda W y + X \beta + u

u=\rho W u + e

with

e ~ N(0,\sigma^2_i)

The model allows for spatial lag in the dependent variable and disturbances. The innovations in the disturbance process are assumed heteroskedastic of an unknown form.

Usage

spreg(formula, data = list(), listw, listw2 = NULL, 
        endog = NULL, instruments = NULL, 
        lag.instr = FALSE, initial.value = 0.2, 
        model = c("sarar", "lag", "error", "ivhac", "ols"),
        het = FALSE, verbose = FALSE, 
        na.action = na.fail,  HAC = FALSE, 
        distance = NULL, type =  c("Epanechnikov","Triangular",
                                   "Bisquare", "Parzen", "QS", "TH","Rectangular"), 
        bandwidth = "variable" , step1.c = FALSE,
        control = list(), Durbin = FALSE)

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, matrix, or Matrix

listw2

an object of class listw, matrix, or Matrix specified only when sarar is true

endog

additional endogenous variables. Default NULL. If not NULL should be specified as a formula with no dependent variable (endog = ~ x1 + x2). Note the ~ before the expression.

instruments

external instruments. Default NULL. If not NULL should be specified as a formula with no dependent variable (instruments = ~ x1 + x2). Note the ~ before the expression.

lag.instr

should the external instruments be spatially lagged?

initial.value

The initial value for \rho. It can be either numeric (default is 0.2) or set to 'SAR', in which case the optimization will start from the estimated coefficient of a regression of the 2SLS residuals over their spatial lag (i.e. a spatial AR model)

model

one of lag, error, sarar, ivhac, or ols. If HAC is TRUE, model should be one of ivhac, or ols.

het

default FALSE: if TRUE uses the methods developed for heteroskedasticity

verbose

print optimization details

na.action

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

HAC

perform the HAC estimator of Kelejian and Prucha, 2007.

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","Rectangular"). The type of Kernel to be used. default = "Epanechnikov" See Details.

bandwidth

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

step1.c

Should step 1.c from Arraiz et al. 2012 be performed?

control

A list of control arguments. See nlminb

Durbin

Should (some of) the regressors be lagged? Default FALSE. If not FALSE should be specified as a formula with no dependent variable (Durbin = ~ x1 + x2) or set to TRUE. See details.

Details

The procedure consists of two steps alternating GM and IV estimators. Each step consists of sub-steps. In step one \delta = [\beta',\lambda]' is estimated by 2SLS. The 2SLS residuals are first employed to obtain an consistent GM estimator of \rho.

In step two, the spatial Cochrane-Orcutt transformed model is estimated by 2SLS. This corresponds to a GS2SLS procedure. The GS2SLS residuals are used to obtain a consistent and efficient GM estimator for \rho.

The initial value for the optimization in step 1b is taken to be initial.value. The initial value for the optimization of step 2b is the optimal parameter of step 1b.

Internally, the object of class listw is transformed into a Matrix using the function listw2dgCMatrix.

For the HAC estimator (Kelejian and Prucha, 2007), there are four possibilities:

Furthermore, 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.

Value

A list object of class sphet

coefficients

Generalized Spatial two stage least squares coefficient estimates of \delta and GM estimator for \rho.

var

variance-covariance matrix of the estimated coefficients

s2

GS2SLS residuals variance

residuals

GS2SLS residuals

yhat

difference between GS2SLS residuals and response variable

call

the call used to create this object

model

the model matrix of data

method

'gs2slshac'

Author(s)

Gianfranco Piras gpiras@mac.com

References

Arraiz, I. and Drukker, M.D. and Kelejian, H.H. and Prucha, I.R. (2010) A spatial Cliff-Ord-type Model with Heteroskedastic Innovations: Small and Large Sample Results, Journal of Regional Sciences, 50, pages 592–614.

Drukker, D.M. and Egger, P. and Prucha, I.R. (2013) On Two-step Estimation of a Spatial Auto regressive Model with Autoregressive Disturbances and Endogenous Regressors, Econometric Review, 32, pages 686–733.

Kelejian, H.H. and Prucha, I.R. (2010) Specification and Estimation of Spatial Autoregressive Models with Autoregressive and Heteroskedastic Disturbances, Journal of Econometrics, 157, pages 53–67.

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.

Gianfranco Piras (2010). sphet: Spatial Models with Heteroskedastic Innovations in R. Journal of Statistical Software, 35(1), 1-21. doi: 10.18637/jss.v035.i01.

Roger Bivand, Gianfranco Piras (2015). Comparing Implementations of Estimation Methods for Spatial Econometrics. Journal of Statistical Software, 63(18), 1-36. doi: 10.18637/jss.v063.i18.

See Also

stslshac

Examples

data(columbus, package="spdep")
listw <- spdep::nb2listw(col.gal.nb)
res <- spreg(CRIME ~ HOVAL + INC, data = columbus , listw = listw,
             het = TRUE, verbose = FALSE, model = "sarar")
summary(res)
Effects <- impacts(res, listw = listw, R = 1000)

[Package sphet version 2.0 Index]