Skip to contents

BinaryGlm: logit or probit by iteratively reweighted least squares. SpatialLogitGmm: Klier-McMillen linearized GMM spatial logit with HC3 standard errors. SpatialProbitGmm: Pinkse-Slade GMM spatial autoregressive probit with McMillen's Gauss-Newton iteration. DiscreteMoranTest: Kelejian-Prucha Moran test on generalized residuals. Identical to the Python arm morie.fn.spdiscrete.

Usage

BinaryGlm(y, X, link = "logit", tol = 1e-12, maxit = 100)

SpatialLogitGmm(y, X, W, Z = NULL)

SpatialProbitGmm(y, X, W, Z = NULL, start_rho = 0, tol = 1e-10, maxit = 500)

DiscreteMoranTest(y, X, W, link = "probit")

Arguments

y

Binary response.

X

Design matrix with the intercept column first.

"logit" or "probit".

tol

Convergence tolerance.

maxit

Iteration limit.

W

Spatial weights.

Z

Optional instrument matrix (default X and W X).

start_rho

Starting rho.

Value

A list.

References

Klier, T. and McMillen, D. P. (2008). Clustering of auto supplier plants in the United States. Journal of Business and Economic Statistics 26, 460-471.

Pinkse, J. and Slade, M. E. (1998). Contracting in space. Journal of Econometrics 85, 125-154.

Kelejian, H. H. and Prucha, I. R. (2001). On the asymptotic distribution of the Moran I test statistic with applications. Journal of Econometrics 104, 219-257.

Examples

X <- cbind(1, c(2, -1, 0.1, 1.5, 0.6, -0.4))
BinaryGlm(c(1, 0, 1, 1, 0, 0), X)$coefficients
#> [1] -0.9137548  2.1817069