step2 | R Documentation |
Estimates the parameters of the classical Heckman selection model using the two-step method. The first step fits a probit model for the selection equation. In the second step, the inverse Mills ratio (IMR) is included as an additional regressor in the outcome equation.
step2(YS, XS, YO, XO)
YS |
A binary vector indicating selection ( |
XS |
A matrix of covariates for the selection equation. |
YO |
A numeric vector representing the outcome variable of interest. |
XO |
A matrix of covariates for the outcome equation. |
This function implements the two-step estimation procedure of the classical Heckman model.
In the first step, a probit model is estimated to predict the selection indicator YS
using
the selection covariates XS
. The IMR is calculated from this model.
In the second step, an ordinary least squares (OLS) regression of the observed outcome YO
on
XO
and the IMR is performed for the uncensored observations (YS == 1
).
The function also calculates:
sigma
: The estimated standard deviation of the outcome equation's error term.
rho
: The estimated correlation between the error terms of the selection and outcome equations.
A numeric vector containing the parameter estimates from the two-step Heckman model:
Coefficients of the selection equation (probit model).
Coefficients of the outcome equation (excluding the IMR term).
Estimated sigma
.
Estimated rho
.
data(MEPS2001)
attach(MEPS2001)
YS <- dambexp
XS <- cbind(age, female, educ, blhisp, totchr, ins)
YO <- lnambx
XO <- cbind(age, female, educ, blhisp, totchr, ins, income)
step2(YS, XS, YO, XO)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.