Estimation of SAR model for binary dependent variables (either Probit or Logit), using Linearized GMM estimator suggested by Klier and McMillen (2008). The model 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)\) link = "logit".
sbinaryLGMM(
formula,
data,
listw = NULL,
nins = 2,
link = c("logit", "probit"),
...
)# S3 method for binlgmm
coef(object, ...)
# S3 method for binlgmm
vcov(object, ...)
# S3 method for binlgmm
print(x, digits = max(3, getOption("digits") - 3), ...)
# S3 method for binlgmm
summary(object, ...)
# S3 method for summary.binlgmm
print(x, digits = max(3, getOption("digits") - 2), ...)
An object of class ``bingmm'', a list with elements:
the estimated coefficients,
the matched call,
the X matrix, which contains also WX if the second part of the formula is used,
the H matrix of instruments used,
the dependent variable,
the spatial weight matrix,
the string indicating the distribution of the error term,
an object of lm representing the T2SLS,
the formula.
a symbolic description of the model of the form y ~ x | wx where y is the binary dependent variable, x are the independent variables. The variables after | are those variables that enter spatially lagged: \(WX\). The variables in the second part of formula must also appear in the first part.
the data of class data.frame.
object. An object of class listw, matrix, or Matrix.
numerical. Order of instrumental-variable approximation; as default nins = 2, such that \(H = (Z, WZ, W^2Z)\) are used as instruments.
string. The assumption of the distribution of the error term; it can be either link = "probit" (the default) or link = "logit".
additional arguments.
an object of class binlgmm.
the number of digits
Mauricio Sarrias and Gianfranco Piras.
The steps for the linearized spatial Probit/Logit model are the following:
1. Estimate the model by standard Probit/Logit model, in which spatial autocorrelation and heteroskedasticity are ignored. The estimated values are \(\beta_0\). Calculate the generalized residuals assuming that \(\lambda = 0\) and the gradient terms \(G_{\beta}\) and \(G_{\lambda}\).
2. The second step is a two-stage least squares estimator of the linearized model. Thus regress \(G_{\beta}\) and \(G_{\lambda}\) on \(H = (Z, WZ, W^2Z, ...., W^qZ)\) and obtain the predicted values \(\hat{G}\). Then regress \(u_0 + G_{\beta}'\hat{\beta}_0\) on \(\hat{G}\). The coefficients are the estimated values of \(\beta\) and \(\lambda\).
The variance-covariance matrix can be computed using the traditional White-corrected coefficient covariance matrix from the last two-stage least squares estimator of the linearlized model.
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.
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.
sbinaryGMM, impacts.bingmm.
# Data set
data(oldcol, package = "spdep")
# Create dependent (dummy) variable
COL.OLD$CRIMED <- as.numeric(COL.OLD$CRIME > 35)
# LGMM for probit using q = 3 for instruments
lgmm <- sbinaryLGMM(CRIMED ~ INC + HOVAL | INC,
link = "probit",
listw = spdep::nb2listw(COL.nb, style = "W"),
nins = 3,
data = COL.OLD)
summary(lgmm)
Run the code above in your browser using DataLab