IMR | R Documentation |
Computes the column vector of the Inverse Mills Ratio (IMR) from a Probit selection equation.
IMR(selection, data = sys.frame(sys.parent()))
selection |
A formula specifying the selection equation. |
data |
A data frame containing the variables in the model. |
This function fits a Probit model to the provided selection equation and returns the Inverse Mills Ratio (IMR) for each observation. The IMR is useful for correcting sample selection bias in regression models, following the classical Heckman approach.
A numeric matrix with one column containing the IMR values for each observation.
data(MEPS2001)
attach(MEPS2001)
selectEq <- dambexp ~ age + female + educ + blhisp + totchr + ins + income
IMR(selectEq, data = MEPS2001)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.