Description Usage Arguments Details Value Note Author(s) References See Also Examples
Fits the endogenous treatment model using a robust two-stage estimator
1 | etregrob(selection, outcome, data, control = heckitrob.control())
|
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 |
control |
a list of parameters for controlling the fitting process. The same list as for sample selection model |
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
.
Object of class "etregrob".
coefficients |
a named vector of coefficients |
stage1 |
object of class |
stage2 |
object of class |
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 |
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.
Mikhail Zhelonkin
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
glmrob
, rlm
, ssmrob
, heckitrob.control
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.