Learn R Programming

ssmodels (version 2.0.1)

IMR: Inverse Mills Ratio (IMR) Calculation

Description

Computes the column vector of the Inverse Mills Ratio (IMR) from a Probit selection equation.

Usage

IMR(selection, data = sys.frame(sys.parent()))

Value

A numeric matrix with one column containing the IMR values for each observation.

Arguments

selection

A formula specifying the selection equation.

data

A data frame containing the variables in the model.

Details

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.

Examples

Run this code
data(MEPS2001)
attach(MEPS2001)
selectEq <- dambexp ~ age + female + educ + blhisp + totchr + ins + income
IMR(selectEq, data = MEPS2001)

Run the code above in your browser using DataLab