ssmrob: Robust Sample Selection Model

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

View source: R/ssmrob.R

Description

Function provides the robust two-stage estimators of truncated selection model (Tobit-2) and switching regression model (Tobit-5).

Usage

1
ssmrob(outcome, selection, control = heckitrob.control())

Arguments

outcome

formula(s), the outcome equation(s)

selection

formula, the selection equation

control

a list of parameters for controlling the fitting process

Details

Outcome equation may be a simple formula for the case of truncated selection model, or a list of two formulas for the case of switching regressions.

Value

Object of class "heckitrob" or object of class "heckit5rob".

Author(s)

Mikhail Zhelonkin, Marc G. Genton, Elvezio Ronchetti

References

Heckman, J.J. (1979). Sample Selection Bias as a Specification Error. Econometrica, 47, p. 153-161.

Zhelonkin, M., Genton M.G., and Ronchetti, E. (2013). Robust Inference in Sample Selection Models, Manuscript.

Amemiya, T. (1984). Tobit Models: a Survey. Journal of Econometrics, 24, p. 3-61.

See Also

heckitrob, heckit5rob

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# sample selection model (Tobit-2)
data(MEPS2001)
attach(MEPS2001)
selectEq <- dambexp ~ age+female+educ+blhisp+totchr+ins
outcomeEq <- lnambx ~ age+female+educ+blhisp+totchr+ins
summary(ssmrob(outcomeEq,selectEq,control=heckitrob.control(tcc=3.2,weights.x1="robCov")))


# switching regressions example (Tobit-5)
library(mvtnorm)
covm <- diag(3)
covm[lower.tri(covm)] <- c(0.75, 0.5, 0.25)
covm[upper.tri(covm)] <- covm[lower.tri(covm)]
eps <- rmvnorm(1000, rep(0, 3), covm)
x1 <- rnorm(1000)
y1 <- x1 + eps[,1] > 0
x21 <- rnorm(1000)
x22 <- rnorm(1000)
y2=ifelse(y1 > 0.5, x21 + eps[,2], x22 + eps[,3])
summary(ssmrob(list(y2 ~ x21, y2 ~ x22), y1 ~ x1))

Example output

Loading required package: sampleSelection
Loading required package: maxLik
Loading required package: miscTools

Please cite the 'maxLik' package as:
Henningsen, Arne and Toomet, Ott (2011). maxLik: A package for maximum likelihood estimation in R. Computational Statistics 26(3), 443-458. DOI 10.1007/s00180-010-0217-1.

If you have questions, suggestions, or comments regarding the 'maxLik' package, please use a forum or 'tracker' at maxLik's R-Forge site:
https://r-forge.r-project.org/projects/maxlik/
Loading required package: robustbase

Attaching package: 'robustbase'

The following objects are masked from 'package:miscTools':

    colMedians, rowMedians

Loading required package: mvtnorm
Loading required package: MASS
------------------------------------------------------------- 
Robust 2-step Heckman / heckit M-estimation 
Probit selection equation: 
                 Estimate  Std.Error t-value  p-value    
XS(Intercept) -0.74914476 0.19506999  -3.840 1.23e-04 ***
XSage          0.10541500 0.02769588   3.806 1.41e-04 ***
XSfemale       0.68740832 0.06225762  11.040 2.41e-28 ***
XSeduc         0.07011568 0.01146521   6.116 9.62e-10 ***
XSblhisp      -0.39774532 0.06264878  -6.349 2.17e-10 ***
XStotchr       0.83283613 0.08027772  10.370 3.24e-25 ***
XSins          0.18256005 0.06371471   2.865 4.17e-03  **
Outcome equation: 
                 Estimate  Std.Error t-value  p-value    
XO(Intercept)  5.40154264 0.27672891  19.520 7.53e-85 ***
XOage          0.20061658 0.02450765   8.186 2.70e-16 ***
XOfemale       0.25501033 0.06992954   3.647 2.66e-04 ***
XOeduc         0.01324867 0.01161609   1.141 2.54e-01    
XOblhisp      -0.15508435 0.06506654  -2.383 1.72e-02   *
XOtotchr       0.48115830 0.03822948  12.590 2.52e-36 ***
XOins         -0.06706633 0.05159205  -1.300 1.94e-01    
imrData$IMR1  -0.67676033 0.25927579  -2.610 9.05e-03  **
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 
-------------------------------------------------------------There were 50 or more warnings (use warnings() to see the first 50)
------------------------------------------------------------- 
Robust 2-step Heckman / heckit M-estimation 
Probit selection equation: 
                Estimate  Std.Error t-value  p-value    
XS(Intercept) -0.1316068 0.04769230  -2.759 5.79e-03  **
XSx1           1.0578756 0.07036723  15.030 4.42e-51 ***
Outcome equation, regime 1: 
                 Estimate  Std.Error t-value   p-value    
XO1(Intercept) 0.04284366 0.08264257  0.5184  6.04e-01    
XO1x21         0.98201267 0.04115470 23.8600 7.69e-126 ***
IMR1           0.69597774 0.10815280  6.4350  1.23e-10 ***
Outcome equation, regime 2: 
                  Estimate  Std.Error t-value   p-value    
XO2(Intercept) -0.05103698 0.06813640  -0.749  4.54e-01    
XO2x22          0.97003307 0.04080786  23.770 6.71e-125 ***
IMR2            0.42550058 0.10037262   4.239  2.24e-05 ***
---
Signif. codes: 0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 
-------------------------------------------------------------There were 50 or more warnings (use warnings() to see the first 50)

ssmrob documentation built on May 29, 2017, 9:48 a.m.