sbinaryGMM {spldv} | R Documentation |
Estimation of SAR for binary dependent models using GMM
Description
Estimation of SAR model for binary dependent variables (either Probit or Logit), using one- or two-step GMM estimator. The type of model supported has the following structure:
y^*= X\beta + WX\gamma + \lambda W y^* + \epsilon = Z\delta + \lambda Wy^{*} + \epsilon
where y = 1
if y^*>0
and 0 otherwise; \epsilon \sim N(0, 1)
if link = "probit"
or \epsilon \sim L(0, \pi^2/3)
if link = "logit"
.
Usage
sbinaryGMM(
formula,
data,
listw = NULL,
nins = 2,
link = c("probit", "logit"),
winitial = c("optimal", "identity"),
s.matrix = c("robust", "iid"),
type = c("onestep", "twostep"),
gradient = TRUE,
start = NULL,
cons.opt = FALSE,
approximation = FALSE,
verbose = TRUE,
print.init = FALSE,
pw = 5,
tol.solve = .Machine$double.eps,
...
)
## S3 method for class 'bingmm'
coef(object, ...)
## S3 method for class 'bingmm'
vcov(
object,
vce = c("robust", "efficient", "ml"),
method = "bhhh",
R = 1000,
tol.solve = .Machine$double.eps,
...
)
## S3 method for class 'bingmm'
print(x, digits = max(3, getOption("digits") - 3), ...)
## S3 method for class 'bingmm'
summary(
object,
vce = c("robust", "efficient", "ml"),
method = "bhhh",
R = 1000,
tol.solve = .Machine$double.eps,
...
)
## S3 method for class 'summary.bingmm'
print(x, digits = max(5, getOption("digits") - 3), ...)
Arguments
formula |
a symbolic description of the model of the form |
data |
the data of class |
listw |
object. An object of class |
nins |
numerical. Order of instrumental-variable approximation; as default |
link |
string. The assumption of the distribution of the error term; it can be either |
winitial |
string. A string indicating the initial moment-weighting matrix |
s.matrix |
string. Only valid of |
type |
string. A string indicating whether the one-step ( |
gradient |
logical. Only for testing procedures. Should the analytic gradient be used in the GMM optimization procedure? |
start |
if not |
cons.opt |
logical. Should a constrained optimization procedure for |
approximation |
logical. If |
verbose |
logical. If |
print.init |
logical. If |
pw |
numeric. The power used for the approximation |
tol.solve |
Tolerance for |
... |
additional arguments passed to |
vce |
string. A string indicating what kind of standard errors should be computed when using |
method |
string. Only valid if |
R |
numeric. Only valid if |
x , object |
an object of class |
digits |
the number of digits |
Details
The data generating process is:
y^*= X\beta + WX\gamma + \lambda W y^* + \epsilon = Z\delta + \lambda Wy^{*} + \epsilon
where y = 1
if y^*>0
and 0 otherwise; \epsilon \sim N(0, 1)
if link = "probit"
or \epsilon \sim L(0, \pi^2/3)
if link = "logit"
.. The general GMM
estimator minimizes
J(\theta) = g'(\theta)\hat{\Psi} g(\theta)
where \theta = (\beta, \gamma, \lambda)
and
g = n^{-1}H'v
where v
is the generalized residuals. Let Z = (X, WX)
, then the instrument matrix H
contains the linearly independent
columns of H = (Z, WZ, ..., W^qZ)
. The one-step GMM estimator minimizes J(\theta)
setting either
\hat{\Psi} = I_p
if winitial = "identity"
or \hat{\Psi} = (H'H/n)^{-1}
if winitial = "optimal"
. The two-step GMM estimator
uses an additional step to achieve higher efficiency by computing the variance-covariance matrix of the moments \hat{S}
to weight the sample moments.
This matrix is computed using the residuals or generalized residuals from the first-step, which are consistent. This matrix is computed as
\hat{S} = n^{-1}\sum_{i = 1}^n h_i(f^2/(F(1 - F)))h_i'
if s.matrix = "robust"
or
\hat{S} = n^{-1}\sum_{i = 1}^n \hat{v}_ih_ih_i'
, where \hat{v}
are the first-step generalized residuals.
Value
An object of class “bingmm
”, a list with elements:
coefficients |
the estimated coefficients, |
call |
the matched call, |
callF |
the full matched call, |
X |
the X matrix, which contains also WX if the second part of the |
H |
the H matrix of instruments used, |
y |
the dependent variable, |
listw |
the spatial weight matrix, |
link |
the string indicating the distribution of the error term, |
Psi |
the moment-weighting matrix used in the last round, |
type |
type of model that was fitted, |
s.matrix |
the type of S matrix used in the second round, |
winitial |
the moment-weighting matrix used for the first step procedure |
opt |
object of class |
approximation |
a logical value indicating whether approximation was used to compute the inverse matrix, |
pw |
the powers for the approximation, |
formula |
the formula. |
Author(s)
Mauricio Sarrias and Gianfranco Piras.
References
Pinkse, J., & Slade, M. E. (1998). Contracting in space: An application of spatial statistics to discrete-choice models. Journal of Econometrics, 85(1), 125-154.
Fleming, M. M. (2004). Techniques for estimating spatially dependent discrete choice models. In Advances in spatial econometrics (pp. 145-168). Springer, Berlin, Heidelberg.
Klier, T., & McMillen, D. P. (2008). Clustering of auto supplier plants in the United States: generalized method of moments spatial logit for large samples. Journal of Business & Economic Statistics, 26(4), 460-471.
LeSage, J. P., Kelley Pace, R., Lam, N., Campanella, R., & Liu, X. (2011). New Orleans business recovery in the aftermath of Hurricane Katrina. Journal of the Royal Statistical Society: Series A (Statistics in Society), 174(4), 1007-1027.
Piras, G., & Sarrias, M. (2023). One or Two-Step? Evaluating GMM Efficiency for Spatial Binary Probit Models. Journal of choice modelling, 48, 100432.
Piras, G,. & Sarrias, M. (2023). GMM Estimators for Binary Spatial Models in R. Journal of Statistical Software, 107(8), 1-33.
See Also
Examples
# Data set
data(oldcol, package = "spdep")
# Create dependent (dummy) variable
COL.OLD$CRIMED <- as.numeric(COL.OLD$CRIME > 35)
# Two-step (Probit) GMM estimator
ts <- sbinaryGMM(CRIMED ~ INC + HOVAL,
link = "probit",
listw = spdep::nb2listw(COL.nb, style = "W"),
data = COL.OLD,
type = "twostep",
verbose = TRUE)
# Robust standard errors
summary(ts)
# Efficient standard errors
summary(ts, vce = "efficient")
# One-step (Probit) GMM estimator
os <- sbinaryGMM(CRIMED ~ INC + HOVAL,
link = "probit",
listw = spdep::nb2listw(COL.nb, style = "W"),
data = COL.OLD,
type = "onestep",
verbose = TRUE)
summary(os)
# One-step (Logit) GMM estimator with identity matrix as initial weight matrix
os_l <- sbinaryGMM(CRIMED ~ INC + HOVAL,
link = "logit",
listw = spdep::nb2listw(COL.nb, style = "W"),
data = COL.OLD,
type = "onestep",
winitial = "identity",
verbose = TRUE)
summary(os_l)
# Two-step (Probit) GMM estimator with WX
ts_wx <- sbinaryGMM(CRIMED ~ INC + HOVAL| INC + HOVAL,
link = "probit",
listw = spdep::nb2listw(COL.nb, style = "W"),
data = COL.OLD,
type = "twostep",
verbose = FALSE)
summary(ts_wx)
# Constrained two-step (Probit) GMM estimator
ts_c <- sbinaryGMM(CRIMED ~ INC + HOVAL,
link = "probit",
listw = spdep::nb2listw(COL.nb, style = "W"),
data = COL.OLD,
type = "twostep",
verbose = TRUE,
cons.opt = TRUE)
summary(ts_c)