gmmlogit(form,inst=NULL,winst=NULL,wmat=NULL,shpfile, startb=NULL,startrho=0,blockid=0,cvcrit=.0001,data=NULL,silent=FALSE)
The GMM estimator chooses $\beta$ and $\rho$ to minimize $(y-p)'Z(Z'Z)^{-1}Z'(y-p)$, where Z is a matrix of instruments specified using the inst and winst options. Unless specified otherwise using the startb and startrho options, initial estimates are obtained using splogit, which implements the simple (and fast) linearized version of the GMM logit model proposed by Klier and McMillen (2008). Convergence is defined by $abs(change) < cvcrit$, where change is the gradient vector implied by applying a standard Gauss-Newton algorithm to the objective function. The covariance matrix (equation 3 in Klier-McMillen, 2008) is estimated using the car package.
Estimation can be very slow because each iteration requires the inversion of an nxn matrix. To speed up the estimation process and to reduce memory requirements, it may be desirable to impose a block diagonal structure on W. For example, it may be reasonable to impose that each state or region has its own error structure, with no correlation of errors across regions. The blockid option specifies a block diagonal structure such as blockid=region. The option leads the program to re-calculate the W matrix, imposing the block diagonal structure and re-normalizing the matrix to again have each row sum to one. If there are G groups, estimation requires G sub-matrices to be inverted rather than one nxn matrix, which greatly reduces memory requirements and significantly reduces the time required in estimation.
gmmlogit 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.
Pinkse, J. and M. E. Slade, "Contracting in Space: An Application of Spatial Statistics to Discrete-Choice Models," Journal of Econometrics 85 (1998), 125-154.
# The example for "gmmprobit" applies directly after changing "gmmprobit" to "gmmlogit"
Run the code above in your browser using DataLab