etregrob: Robust Fit of Endogenous Treatment Model

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/etregrob.R

Description

Fits the endogenous treatment model using a robust two-stage estimator

Usage

1
etregrob(selection, outcome, data, control = heckitrob.control())

Arguments

selection

formula, the selection 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 etregrob is called.

control

a list of parameters for controlling the fitting process. The same list as for sample selection model

Details

Compute robust two-step estimates of the Endogenous Treatment Model. The robust probit is fitted in the first stage. In the second stage the Mallows type M-estimator is used instead of traditional OLS. The correction for endogeneity is made by means of control function, which is the inverse Mills ratio for a complete sample (see Maddala, 1983, p. 120-122). The values of the tuning constants and the robustness weights can be modified in heckitrob.control.

Value

Object of class "etregrob".

coefficients

a named vector of coefficients

stage1

object of class glmrob that contains robust probit fit

stage2

object of class rlm that contains second stage robust 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

sigma

the standard error of the error term of the outcome equation

CIMR

inverse Mills ratio for the complete sample

call

the matched call

method

method of estimation, currently only "robust two-stage" is implemented

converged

logical. Did all the estimators converge?

iterations

list containing the numbers of iterations

Note

The treatment variable is automatically included in the formula for the second estimation step, i.e. one should not add the dependent variable from the selection equation in the formula of the outcome equation.

Author(s)

Mikhail Zhelonkin

References

Maddala G.S. (1983) Limited-Dependent and Qualitative Variables in Econometrics. Cambridge: Cambridge University Press.

Zhelonkin, M., Ronchetti, E. (2021) Robust Analysis of Sample Selection Models through the R Package ssmrob. Journal of Statistical Software, 99, 4, p. 1-35. doi: 10.18637/jss.v099.i04

See Also

glmrob, rlm, ssmrob, heckitrob.control

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(mvtnorm)
set.seed(2)
N <- 3000
beta1 <- c(1.0, 1.0, 0.75)
beta2 <- c(1.5, 1.0, 0.5)
alpha <- 1.25
x1 <- rmvnorm(N, mean = c(0, -1, 1), sigma = diag(c(1, 0.5, 1)))
x2 <- x1 
x2[, 3] <- rnorm(N, 1, 1)
eps <- rmvnorm(N, mean = rep(0, 2), sigma = matrix(c(1, -0.7, -0.7, 1), 2, 2))
x1beta1 <- x1[, 1]*beta1[1] + x1[, 2]*beta1[2] + x1[, 3]*beta1[3]
x2beta2 <- x2[, 1]*beta2[1] + x2[, 2]*beta2[2] + x2[, 3]*beta2[3]
y1 <- ifelse(x1beta1 + eps[, 1] > 0, 1, 0)
y2 <- x2beta2 + alpha*y1 + eps[,2]
etm.ctrl <- heckitrob.control(weights.x1 = "hat", weights.x2 = "covMcd")
etmsim.fit <- etregrob(y1 ~ x1, y2 ~ x2, control = etm.ctrl)
summary(etmsim.fit)

ssmrob documentation built on Aug. 20, 2021, 5:08 p.m.