rcbr {RCBR} | R Documentation |
Estimation of Random Coefficient Binary Response Models
Description
Two methods are implemented for estimating binary response models with random coefficients: A nonparametric maximum likelihood method proposed by Cosslett (1986) and extended by Ichimura and Thompson (1998), and a (hemispherical) deconvolution method proposed by Gautier and and Kitamura (2013). The former is closely related to the NPMLE for mixture models of Kiefer and Wolfowitz (1956). The latter is an R translation of the matlab implementation of Gautier and Kitamura.
Usage
rcbr(formula, data, subset, offset, mode = "GK", ...)
Arguments
formula |
an expression of the generic form |
data |
is a |
subset |
specifies a subsample of the data used for fitting the model |
offset |
specifies a fixed shift in |
mode |
controls whether the Gautier and Kitamura, "GK", or Kiefer and Wolfowitz, "KW" methods are used. |
... |
miscellaneous other arguments to control fitting.
See |
Details
The predict
method produces estimates of the probability of a "success"
(y = 1) for a particular vector, (z,v)
, when aggregated over the estimated
distribution of random coefficients.
The logLik
produces an evaluation of the log likelihood value
associated with a fitted model.
Value
of object of class GK
, KW1
, with components described in
further detail in the respective fitting functions.
Author(s)
Jiaying Gu and Roger Koenker
References
Kiefer, J. and J. Wolfowitz (1956) Consistency of the Maximum Likelihood Estimator in the Presence of Infinitely Many Incidental Parameters, Ann. Math. Statist, 27, 887-906.
Cosslett, S. (1983) Distribution Free Maximum Likelihood Estimator of the Binary Choice Model, Econometrica, 51, 765-782.
Gautier, E. and Y. Kitamura (2013) Nonparametric estimation in random coefficients binary choice models, Ecoonmetrica, 81, 581-607.
Gu, J. and R. Koenker (2020) Nonparametric Maximum Likelihood Methods for Binary Response Models with Random Coefficients, J. Am. Stat Assoc
Groeneboom, P. and K. Hendrickx (2016) Current Status Linear Regression, preprint available from https://arxiv.org/abs/1601.00202.
Ichimura, H. and T. S. Thompson, (1998) Maximum likelihood estimation of a binary choice model with random coefficients of unknown distribution," Journal of Econometrics, 86, 269-295.
Examples
{
if(packageVersion("Rmosek") > "8.0.0"){
# Simple Test Problem for rcbr
n <- 60
B0 = rbind(c(0.7,-0.7,1),c(-0.7,0.7,1))
z <- rnorm(n)
v <- rnorm(n)
s <- sample(0:1, n, replace = TRUE)
XB0 <- cbind(1,z,v) %*% t(B0)
u <- s * XB0[,1] + (1-s) * XB0[,2]
y <- (u > 0) - 0
D <- data.frame(z = z, v = v, y = y)
f <- rcbr(y ~ z + v, mode = "KW", data = D)
plot(f)
# Simple Test Problem for rcbr
set.seed(15)
n <- 100
B0 = rbind(c(0.7,-0.7,1),c(-0.7,0.7,1))
z <- rnorm(n)
v <- rnorm(n)
s <- sample(0:1, n, replace = TRUE)
XB0 <- cbind(1,z,v) %*% t(B0)
u <- s * XB0[,1] + (1-s) * XB0[,2]
y <- (u > 0) - 0
D <- data.frame(z = z, v = v, y = y)
f <- rcbr(y ~ z + v, mode = "GK", data = D)
contour(f$u, f$v, matrix(f$w, length(f$u)))
points(x = 0.7, y = -0.7, col = 2)
points(x = -0.7, y = 0.7, col = 2)
f <- rcbr(y ~ z + v, mode = "GK", data = D, T = 7)
contour(f$u, f$v, matrix(f$w, length(f$u)))
points(x = 0.7, y = -0.7, col = 2)
points(x = -0.7, y = 0.7, col = 2)
}
}