Package 'epmrob'

Title: Robust Estimation of Probit Models with Endogeneity
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>.
Authors: Mikhail Zhelonkin [aut, cre] , Andre Bik [aut], Andrea Naghi [aut]
Maintainer: Mikhail Zhelonkin <[email protected]>
License: GPL-2
Version: 0.1
Built: 2024-12-18 06:38:08 UTC
Source: CRAN

Help Index


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 <[email protected]>

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

epmrob, IVProbitRob


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 "epmrob".

...

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 environment(formula), typically the environment from which epmrob is called.

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 rlm that contains first stage robust fit

stage2

object of class glmrob that contains second stage robust probit fit. Note that the standard errors in this object are biased, since they are not corrected for the uncertainty in the first estimation step. Use vcov below

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

rlm, rob.control


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 "epmrob".

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


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 environment(formula), typically the environment from which IVProbitRob is called.

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

epmrob

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

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 epmrob class.

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

epmrob


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 summary.epmrob returned by a summary function.

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 "epmrob".

...

currently not used.

Value

object of class "summary.epmrob".

Author(s)

Mikhail Zhelonkin, Andre Bik, Andrea Naghi

See Also

epmrob


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

See Also

cov.rob