# \donttest{
# 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| HOVAL,
link = "probit",
listw = spdep::nb2listw(COL.nb, style = "W"),
data = COL.OLD,
type = "twostep")
# Marginal effects using Delta Method
summary(impacts(ts, type = "delta"))
# Marginal effects using MC with 100 draws
summary(impacts(ts, type = "mc", R = 100))
# Marginal effects using efficient VC matrix
summary(impacts(ts, type = "delta", vce = "efficient"))
# Marginal effects using efficient VC matrix and ignoring the heteroskedasticity
summary(impacts(ts, type = "delta", vce = "efficient", het = FALSE))
# }
Run the code above in your browser using DataLab