Learn R Programming

McSpatial (version 1.1.1)

spprobit: Linearized GMM spatial probit

Description

Implements the Klier-McMillen (2008) linearized GMM probit model for a 0-1 dependent variable and an underlying latent variable of the form $Y^* = \rho WY^* + X \beta +u$

Usage

spprobit(form,inst=NULL,winst=NULL,wmat=NULL,shpfile,data=NULL,silent=FALSE)

Arguments

form
Model formula
inst
List of instruments not to be pre-multiplied by W. Entered as inst=~w1+w2 ... Default: inst=NULL. See details for more information.
winst
List of instruments to be pre-multiplied by W before use. Entered as winst=~w1+w2 ... Default: inst=NULL. See details for more information.
wmat
Directly enter wmat rather than creating it from a shape file. Default: not specified. One of the wmat or shpfile options must be specified.
shpfile
Shape file to be used for creating the W matrix. Default: not specified. One of the wmat or shpfile options must be specified.
data
A data frame containing the data. Default: use data in the current working directory
silent
If silent=T, no output is printed

Value

  • coefCoefficient estimates
  • seStandard error estimates

Details

The linearized model is a three-step estimation procedure. Let y be the indicator value: y = 1 when $y^* > 0$ and y = 0 when $y^* < 0$. The first stage is standard probit of y on X. The probability estimates from this regression are $p = \Phi(X \hat{\beta)}$ and the generalized error is $e = (y-p)\phi(X \hat{\beta})/(p(1-p))$. The second/third stage of the procedure is standard 2SLS estimation of $u = e + gX \hat{\beta}$ on $gX$ and $gWX \hat{\beta}$ using Zas instruments, where g is the gradient vector, $-de/d \hat{\beta}$. The covariance matrix (equation 3 in Klier-McMillen, 2008) is estimated using the car package. The final estimates minimize $e'Z(Z'Z)^{-1}Z'e$ with e linearized around $\hat{\beta}$ and p = 0. spprobit provides flexibility in specifying the list of instruments. By default, the instrument list includes X and WX, where X is the original explanatory variable list and W is the spatial weight matrix. It is also possible to directly specify the full instrument list or to include only a subset of the X variables in the list that is to be pre-multiplied by W. Let list1 and list2 be user-provided lists of the form list=~z1+z2. The combinations of defaults (NULL) and lists for inst alter the final list of instruments as follows: inst = NULL, winst = NULL: Z = (X, WX) inst = list1, winst = NULL: Z = list1 inst = NULL, winst = list2: Z = (X, W*list2) inst = list1, winst = list2: Z = (list1, W*list2) Note that when inst=list1 and winst=NULL it is up to the user to specify at least one variable in list1 that is not also included in X.

References

Klier, Thomas and Daniel P. McMillen, "Clustering of Auto Supplier Plants in the United States: Generalized Method of Moments Spatial Logit for Large Samples," Journal of Business and Economic Statistics 26 (2008), 460-471.

See Also

cparlogit cparprobit cparmlogit gmmlogit gmmprobit splogit spprobitml

Examples

Run this code
set.seed(9947)
library(maptools)
cmap <- readShapePoly(system.file("maps/CookCensusTracts.shp",
  package="McSpatial"))
cmap <- cmap[cmap$CHICAGO==1&cmap$CAREA!="O'Hare",]
wmat <- makew(cmap)$wmat
n = nrow(wmat)
rho = .4
x <- runif(n,0,10)
ystar <- as.numeric(solve(diag(n) - rho*wmat)%*%(x + rnorm(n,0,2)))
y <- ystar>quantile(ystar,.4)
fit <- spprobit(y~x,  wmat=wmat)

Run the code above in your browser using DataLab