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 |
listw2 |
an object of class |
endog |
additional endogenous variables. Default |
instruments |
external instruments. Default |
lag.instr |
should the external instruments be spatially lagged? |
initial.value |
The initial value for |
model |
one of |
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 |
type |
One of |
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 |
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:
A model with only Wy
A model with Wy and additional endogenous
Only additional endogenous (with no Wy)
No additional endogenous variables
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:
-
'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
ifz \leq 0.5
andK(z) = 2(1-|z|)^3
if0.5 < z \leq 1
-
'TH'
(Tukey - Hanning):K(z) = \frac{1+ \cos(\pi z)}{2}
-
'Rectangular'
:K(z) = 1
-
'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.
Value
A list object of class sphet
coefficients |
Generalized Spatial two stage least squares coefficient estimates of |
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 |
|
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
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)