twostep | R Documentation |
Estimates the parameters of the classical Heckman sample selection model using the two-step procedure.
twostep(selection, outcome, data = sys.frame(sys.parent()))
selection |
A formula for the selection equation. |
outcome |
A formula for the outcome equation. |
data |
A data frame containing the variables. |
The two-step method first estimates a Probit model for the selection equation, then fits an outcome equation that includes the Inverse Mills Ratio (IMR) as an additional regressor to correct for sample selection bias.
A numeric vector containing:
Estimated coefficients of the selection equation (Probit model),
Estimated coefficients of the outcome equation (excluding IMR),
Estimated standard deviation of the outcome errors (phi
),
Estimated correlation between the error terms (cor
).
For details, see \insertCiteheckman1979sample;textualssmodels.
data(MEPS2001)
attach(MEPS2001)
selectEq <- dambexp ~ age + female + educ + blhisp + totchr + ins + income
outcomeEq <- lnambx ~ age + female + educ + blhisp + totchr + ins
twostep(selectEq, outcomeEq, data = MEPS2001)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.