Demystifying Heckman’s Two-Stage Model (Heckit) for MNAR Data
A deep dive into Heckman’s Two-Stage Model (Heckit), a Nobel Prize-winning statistical framework designed to mathematically eliminate selection bias in MNAR data. It breaks down the probit and OLS stages, details the Inverse Mills Ratio, and highlights the strict requirement of the Exclusion Restriction.
Author: Somesh ChatterjeeDemystifying Heckman’s Two-Stage Model (Heckit) for MNAR Data
Heckman’s Two-Stage Model (commonly known as Heckit) is a Nobel Prize-winning statistical technique designed specifically to correct for sample selection bias.
In a Missing Not at Random (MNAR) scenario, data isn't missing by accident. Instead, individuals systematically "select" themselves out of being observed. For example, individuals with the highest wages might refuse to report them, or patients with the most severe side effects might drop out of a clinical trial.
If you run a standard Ordinary Least Squares (OLS) regression on only the available data, your coefficients will be deeply biased because you are ignoring the hidden mechanism governing why the data is missing. Heckit resolves this by treating missingness as an explicit, modelable choice.
The Mathematical Problem Heckit Solves
Imagine you want to model Wage based on Education. However, you can only observe wages for people who are actually employed.
-
The Primary Equation (Outcome): (Where is Wage, is Education, and is the error term)
-
The Selection Equation (Missingness): (Where is a latent variable representing the propensity to work, represents factors influencing that choice like childcare or unearned income, and is the error term)
We only observe if . If and are correlated (), it means the unobserved factors that make someone likely to work (like high personal motivation) are the exact same unobserved factors that give them a higher wage. Standard regression fails here because the error term no longer averages out to zero.
How the Heckit Framework Works (The Two Stages)
Heckit elegantly bypasses this issue by breaking the problem into two distinct statistical steps:
Stage 1: The Selection Equation (Probit)
- The Process: You run a Probit regression on your entire dataset (both the complete cases and the missing cases). The binary dependent variable is whether the outcome data is observed () or missing ().
- The Output: This stage estimates the probability that an individual sample will be observed based on their characteristics ().
- The Inverse Mills Ratio (IMR): From this probit model, the algorithm calculates a value for every single data point called the Inverse Mills Ratio, usually denoted as (lambda). The IMR represents the odds ratio of a sample being observed versus being missing given its observed features.
Stage 2: The Outcome Equation (OLS)
- The Process: You run your primary linear regression (OLS) only on the complete cases where data is observed.
- The Twist: You add the Inverse Mills Ratio () computed from Stage 1 as an additional explanatory variable (a regressor) into the model.
- The Result: The model now looks like this:
- By including , you effectively soak up the variance caused by the selection bias. If the coefficient for () is statistically significant, it proves selection bias was present, and your newly adjusted coefficients are now mathematically unbiased.
🔑 Critical Requirement: The Exclusion Restriction
For Heckit to work reliably, you must satisfy a strict rule called the Exclusion Restriction.
Your Stage 1 model () must include at least one variable—known as an Instrumental Variable—that directly affects whether the data is missing, but has absolutely no direct effect on the final outcome ().
- Good Example (Wages): Number of young children at home. It heavily influences whether someone chooses to enter the workforce (Stage 1 missingness), but it does not directly dictate what an employer sets as a market hourly wage rate (Stage 2 outcome).
- Bad Example: Past work experience. It influences both whether you get a job and how much you get paid, failing the exclusion rule.
Note: Without a valid instrument, Heckit suffers from severe multicollinearity, making your final estimates highly unstable.
Summary Comparison: OLS vs. Heckit
| Feature | Standard Regression (OLS) | Heckman Two-Stage (Heckit) |
|---|---|---|
| Data Scope | Uses complete cases only, discards missing rows. | Uses all rows for Stage 1; complete rows for Stage 2. |
| MNAR Capacity | Biased. Completely ignores the cause of missingness. | Unbiased. Explicitly models and penalizes selection bias. |
| Primary Risk | Misleading conclusions and skewed parameters. | Highly sensitive to choosing a bad instrumental variable. |
ELI5
Imagine you want to find out the average allowance of kids in your classroom, so you pass around a survey asking everyone how much pocket money they get.
But there’s a catch: the kids who get the smallest allowance feel embarrassed and refuse to fill out the form.
Because they hid their answers, their data is Missing Not At Random (MNAR). If you only average the papers you collected, your final number will be way too high. You have a selection bias.
The Heckit method (invented by James Heckman) is a clever two-step math trick that fixes this bias and guesses what those missing numbers look like.
Step 1: Guess who hid their answers (The Selection Equation)
First, you look at everyone in the room—both the kids who answered and the kids who didn't. You need to find a clue that explains why someone might hide their paper, but it cannot be related to how rich their parents are.
- You look at where each student sits. Kids sitting right in the front row, right next to the teacher's desk, feel a lot of social pressure. They hand in the paper just to avoid an awkward interaction. Kids sitting way in the back corner can easily slide by without handing it in.
- You build a formula to calculate the probability that a student will hide their answer based strictly on their desk distance from the teacher.
- From this probability, you calculate a penalty score (statisticians call this the Inverse Mills Ratio). Think of this score as an isolated "shyness rating."
The Paradox: How does desk distance find missing allowances?
If seating has nothing to do with money, how does this help us? The instrument acts as a controlled baseline to unmask the hidden bias.
Imagine two kids, Timmy and Johnny, who both sit way in the back row. They both have the exact same operational freedom to hide their papers.
- Timmy turns his paper in anyway.
- Johnny hides his paper.
Why did Johnny hide it when Timmy didn't, even though they faced the exact same seating pressure? The math reasons: “It must be because Johnny possesses a high amount of that invisible trait—embarrassment over a low allowance.”
By using desk distance to standardize the environmental pressure, the math successfully isolates the pure, unobserved financial embarrassment.
Step 2: Fix the final math (The Outcome Equation)
Now, you look only at the papers you actually collected. But you don't just average them.
- You line up the numbers and add your newly isolated "shyness rating" to the equation.
- The math looks at the kids who did turn in their papers and notices: "Every time a kid has even a tiny bit of this isolated shyness rating, their allowance numbers look noticeably lower."
- By factoring in how likely someone like them was to hide based on their seat location, the math automatically extrapolates and adjusts for the missing low-allowance kids in the back.
The takeaway: By finding a clever clue (like seating distance) that explains the opportunity to hide data without distorting the final numbers, the Heckit method successfully unmasks and corrects for the financial reason people hid their data.