Type: | Package |
Title: | Robust Estimation of Probit Models with Endogeneity |
Version: | 0.1 |
Date: | 2023-06-14 |
Author: | Mikhail Zhelonkin |
Maintainer: | Mikhail Zhelonkin <Mikhail.Zhelonkin@gmail.com> |
Description: | Package provides a set of tools for robust estimation and inference for probit model with endogenous covariates. The current version contains a robust two-step estimator. For technical details, see Naghi, Varadi and Zhelonkin (2022), <doi:10.1016/j.ecosta.2022.05.001>. |
License: | GPL-2 |
Imports: | robustbase, MASS |
Suggests: | mvtnorm |
NeedsCompilation: | no |
Packaged: | 2023-06-15 13:37:29 UTC; M.Zhelonkin |
Repository: | CRAN |
Date/Publication: | 2023-06-16 09:10:02 UTC |
Robust estimation of probit models with endogeneity
Description
Package provides a set of tools for robust estimation of probit models with endogeneity.
Details
Package: | epmrob |
Type: | Package |
Version: | 1.0 |
Date: | 2023-06-14 |
License: | GPL-2 |
Author(s)
Mikhail Zhelonkin, Andre Bik, Andrea Naghi
Maintainer: Mikhail Zhelonkin <Mikhail.Zhelonkin@gmail.com>
References
Naghi, A. A., Varadi, M., & Zhelonkin, M. (2022). Robust Estimation of Probit Models with Endogeneity. Econometrics and Statistics. doi:10.1016/j.ecosta.2022.05.001
See Also
Robust Probit Model with Endogeneity
Description
Compute robust two-stage estimates of probit model with endogeneity.
Usage
IVProbitRob(reduced, outcome, data, control = rob.control())
Arguments
reduced |
formula, the reduced function. |
outcome |
formula, the outcome function. |
data |
an optional data fram containing the varaibles in the model. If not found in data, the variables are taken from |
control |
a list of parameters for controlling the fitting process. |
Details
Compute robust two-step estimates of the endogenous probit model.
Value
Object of class "epmrob".
Author(s)
Mikhail Zhelonkin, Andre Bik, Andrea Naghi
References
Naghi, A. A., Varadi, M., & Zhelonkin, M. (2022). Robust Estimation of Probit Models with Endogeneity. Econometrics and Statistics. doi:10.1016/j.ecosta.2022.05.001
See Also
Examples
library(mvtnorm)
N <- 2000
M <- 500
cont.frac = 0.01
rho = 0.5
sigma = matrix(c(1, rho, rho, 1), 2, 2)
gamma1 = 1
gamma2 = c(0.6, 0.4)
alpha1 = c(0.5)
beta1 = 0.5
set.seed(123)
X1 = rnorm(N,0,1)
X2 = rnorm(N,0,1)
X3 = rnorm(N,0,1)
eps = rmvnorm(N, mean =rep(0,2), sigma = sigma)
Y1 = X1*gamma1 + X2*gamma2[1] + X3*gamma2[2] + eps[,1]
Y2 = ifelse(X1*beta1 + Y1*alpha1 + eps[,2] > 0, 1, 0)
dat.exmpl <- data.frame(Y2, Y1, X1, X2, X3)
names(dat.exmpl) <- c("int", "endo", "exo", "ivrbl", "ivrbl2")
ivp.fit <- IVProbitRob(endo ~ exo + ivrbl + ivrbl2, int ~ endo + exo, data = dat.exmpl,
control = rob.control(weights.x1 = "hat", weights.x2 = "hat"))
ivp.fit
Extract Coefficients from the Robust Endogenous Probit Model Fit
Description
Returns the coefficients of the robust two-stage estimator for endogenous probit model.
Usage
## S3 method for class 'epmrob'
coef(object, ...)
Arguments
object |
object of class " |
... |
currently not used. |
Value
Returns a list of two vectors of parameters of two stages.
R |
coefficients of the reduced equation. |
O |
coefficients of the outcome equation. |
Author(s)
Mikhail Zhelonkin, Andre Bik, Andrea Naghi
Robust Fit of Probit Model with Endogeneity
Description
Fits the endogenous probit model using a robust two-stage estimator.
Usage
epmrob(reduced, outcome, data, control = rob.control())
Arguments
reduced |
formula, the reduced equation. |
outcome |
formula, the outcome equation. |
data |
an optional data frame containing the variables in the model. If not found in data, the variables are taken from |
control |
a list of parameterse for controlling the fitting process. |
Details
Compute robust two-step estimates of the endogenous probit model. The robust linear regression is fitted in the first stage. In the second stage a Mallows-type M-estimator is used instead of the probit MLE.
The values of the tuning constants and the robustness weights can be modified in rob.control
.
Value
Object of class "epmrob".
coefficients |
a named vector of coefficients |
stage1 |
object of class |
stage2 |
object of class |
vcov |
variance matrix of the second stage |
call |
the matched call |
Author(s)
Mikhail Zhelonkin, Andre Bik, Andrea Naghi
References
Naghi, A. A., Varadi, M., and Zhelonkin, M. (2022). Robust Estimation of Probit Models with Endogeneity. Econometrics and Statistics. doi:10.1016/j.ecosta.2022.05.001
See Also
Extract Asymptotic Variance Covariance Matrix
Description
Extracts the variance covariance matrix of the robust endogenous probit model fit by applying a bootstrap.
Usage
epmrob.vcov(object, B = 200, control = rob.control())
Arguments
object |
object of class " |
B |
the number of samples used in the bootstrapping process used to calculate the variance covariance matrix. |
control |
a list of parameters for controlling the fitting process. |
Details
The variance covariance matrix is estimated by applying a bootstrap
Value
Variance covariance matrix of the entire estimation procedure. Variance covariance matrix of the reduced stage or outcome stage can be extracted using the vcov
function for the corresponding stage estimator, e.g. vcov(epmrob.object$stage1)
or vcov(epmrob.object$stage2)
.
Author(s)
Mikhail Zhelonkin, Andre Bik, Andrea Naghi
Print a epmrob
object
Description
Print an object generated by epmrob
.
Usage
## S3 method for class 'epmrob'
print(x, digits = 4, ...)
Arguments
x |
object of |
digits |
number of significant digits to be printed. |
... |
currently not used. |
Value
No return value.
Author(s)
Mikhail Zhelonkin, Andre Bik, Andrea Naghi
See Also
Print Function for summary.epmrob
Description
Print a summary.epmrob
object.
Usage
## S3 method for class 'summary.epmrob'
print(x, digits = 4, ...)
Arguments
x |
object of class |
digits |
number of nonzero digits after comma. |
... |
currently not used. |
Value
No return value.
Author(s)
Mikhail Zhelonkin, Andre Bik, Andrea Naghi
Auxiliary for Controlling Robust Fitting
Description
Auxiliary function used for fitting the endogenous probit models. Contains control sequences, tuning constants and robustness weight functions.
Usage
rob.control(acc = 1e-04, maxit = 50, weights.x1 = c("none", "hat", "robCov", "covMcd"),
weights.x2 = c("none", "hat", "robCov", "covMcd"), clevel1 = 0.95, tcc = 1.345)
Arguments
acc |
positive convergence level. |
maxit |
integer giving the maximum number of iterations. |
weights.x1 |
vector of robustness weights controlling for the leverage effect in the reduced equation. |
weights.x2 |
vector of robustness weights controlling for the leverage effect in the outcome equation. |
clevel1 |
value for the critical level for the first stage. |
tcc |
tuning constant c for Huber's psi-function for the first, reduced, stage. |
Value
A list with the arguments as components.
Author(s)
Mikhail Zhelonkin, Andre Bik, Andrea Naghi
Summarizing Robust Fits of Endogenous Probit Models
Description
Summarizes robust fit of endogenous probit models.
Usage
## S3 method for class 'epmrob'
summary(object, ...)
Arguments
object |
object of class " |
... |
currently not used. |
Value
object of class "summary.epmrob
".
Author(s)
Mikhail Zhelonkin, Andre Bik, Andrea Naghi
See Also
Robustness Weights
Description
Auxiliary function. Computation of the leverage weights based on robust Mahalanobis distance.
Usage
xweights(X, weight, clevel1)
Arguments
X |
matrix of explanatory variables. |
weight |
method used to calculated the weighting. |
clevel1 |
the critical level used for calculating the Mahalanobis distance. |
Value
Vector of weights.
Author(s)
Mikhail Zhelonkin, Andre Bik, Andrea Naghi