← 3. Relationships & regression
Heckman Selection Model
Try this analysis →

Heckman Selection Model

Brings the selection process that determines whether an outcome is observed into the model.

Selection equationInverse Mills ratioTwo-step estimationExclusion restriction

Graduates2,000Employed 1,400Wage observedNot employed 600Wage unknownExperience →AllgraduatesEmployedonlyNot employed · not observed

Suppose we are studying the factors that affect college graduates' wages. The researcher wants to see how wages vary with graduates' education level, work experience, whether they hold a professional certification and so on.

But on checking the data, there is a problem. Wages can be surveyed for graduates who are employed, but no wage is observed for graduates who are not employed. Is it enough, then, to run a regression using only the data on employed people?

Not necessarily. If employment is related to factors that also affect wages, such as a person's ability, motivation to find work or health, results based only on the employed may not properly reflect the potential wage structure of all graduates.

This problem, which arises when the people whose outcome is observed are not determined at random, is called sample selection bias. A standard method for dealing with it is the Heckman selection model.

The Heckman selection model considers both the process that determines whether the outcome is observed and the process that determines the outcome itself. Its best-known estimation method, Heckman two-step estimation, first analyzes employment status and then uses the result to correct the selection bias in the wage regression.

In this article we look at the basic principle of the Heckman selection model and when it applies, the inverse Mills ratio, the two-step estimation process, a worked example, and diagnostics and interpretation of results.

SECTION 1

What is the Heckman selection model?

The Heckman selection model is a method for analyzing situations where the outcome is observed only for people who have gone through a particular selection process.

In wage studies, for example, only the wages of employed people are observed. It is not that people who are not employed have their wage recorded as $0; rather, the potential wage they could have earned had they been employed cannot be observed.

2,000 graduatesEmployed 1,400Wage observedNot employed 600Wage unknown
Whose wages are observed

If employment is related to unobserved factors that affect wages, an ordinary regression using only the sample of the employed can suffer from selection bias. The Heckman selection model expresses this problem with two equations.

PartWhat it analyzesExample
Selection equationWhether the outcome is observedEmployed or not
Outcome equationLevel of the observed outcomeWages of the employed

The key to this method is not simply separating the employed from those who are not. It lies in building into the model whether the unobserved factors that affect employment and those that affect wage levels are related to each other.

However, the Heckman model assumes this relationship takes a particular probability distribution and functional form. So the mere fact that you used the model does not solve every sample selection problem.

SECTION 2

Why does sample selection bias occur?

To understand sample selection bias, consider running a wage regression on employed graduates only.

The researcher wants to know how much higher the wages of people with a certification are than those without. But employment can be affected not only by certification but also by a person's job skills, motivation to find work and so on.

AllEmployed onlyAll-graduate lineExperience →Experience →Not employed · not observed
Sample selection bias

For example, among people without a certification, those who succeeded in getting a job may be people with relatively strong job skills or experience. People with a certification, on the other hand, may get jobs across a wide range of ability levels.

In that case, comparing certification holders and non-holders within the sample of the employed can give a different result from the potential wage gap in the full population of graduates.

Sample selection bias does not arise simply because some data are missing. It becomes a problem when the selection process that determines whether the outcome is observed is related to the error term of the outcome equation.

Conversely, if employment is unrelated to the unobserved determinants of wages, and the conditional mean of the outcome equation is correctly specified, a regression using only the employed may show no selection bias. So whether a Heckman model is needed depends less on whether there are missing values than on the selection structure that produces them.

SECTION 3

Worked example: employment and wages of college graduates

Suppose a research institute surveyed 2,000 college graduates.

Of these, 1,400 were employed and 600 were not employed at the time of the survey. The researcher wants to find out how certification, experience and so on relate to wage levels after employment.

Analysis data

ItemDetails
Total surveyed2,000
Employed1,400
Not employed600
Selection variableEmployed (employed 1, not employed 0)
Outcome variableMonthly wage ($)
Main explanatory variablesCertification, experience, major, etc.
Additional variable in the selection equationAccess to job fairs in area of residence
Purpose of analysisAnalyze determinants of potential wages, accounting for selection into employment

In this example we assume that access to job fairs offered to graduates in each area affects the likelihood of employment, but has no direct effect on wage levels once major, experience, local labor market characteristics and so on are controlled for.

Such a variable can be used as an identifying variable, included in the selection equation and excluded from the outcome equation. In real research, however, you need to check carefully whether this assumption holds. If job fairs directly improve connections to high-paying jobs, they can also affect wages and may not be a valid exclusion variable.

The research question is:

"Accounting for sample selection due to employment status, how are certification and experience related to graduates' potential wage levels?"

SECTION 4

How is the selection equation set up?

The first part of the Heckman model is the selection equation, which explains the probability that the outcome is observed.

When analyzing employment status, you can use a latent variable model like the following.

S*i = Ziᵀγ + ui

Si = 1 (if S*i > 0) · 0 (if S*i ≤ 0)

Here Si is actual employment status, and S*i is an unobserved latent variable that determines selection into employment. Zi includes variables related to employment, such as certification, experience, major and access to job fairs.

Heckman two-step estimation usually estimates the probability of employment with a probit model.

P(Si = 1 | Zi) = Φ(Ziᵀγ)

For example, graduates with a certification or with better access to job fairs may show a higher probability of employment. But the coefficients of the selection equation should not be read directly as changes in the probability of employment. In a probit model, marginal effects are usually computed separately to understand the size of the change in probability.

SECTION 5

What does the outcome equation explain?

The second part is the outcome equation, which explains the actual wage level.

Y*i = Xiᵀβ + εi · where Yi = Y*i (observed only when Si = 1)

Here Y*i is the potential monthly wage a graduate would earn if employed, and Xi are wage determinants such as certification and experience. This potential wage is observed only for people who are employed. So the potential wages of those not employed do not exist in the data.

The problem is that the error term of the selection equation, ui, and the error term of the outcome equation, εi, can be correlated. For example, if unobserved job skills raise both the likelihood of employment and the wage level, a positive correlation can arise between the two error terms.

Ignoring this correlation can bias a wage regression computed conditional on the sample of the employed. The Heckman selection model explicitly takes this correlation between the error terms into account.

SECTION 6

How does Heckman two-step estimation work?

Heckman two-step estimation estimates the selection equation and the outcome equation in turn.

Step 1 · Selection equationEstimate employment probability by probitAll 2,000Inverse Mills ratio λλ = φ(Zγ) ÷ Φ(Zγ)Step 2 · Outcome equationAdd λ to the wage regression1,400 employed
Heckman two-step estimation

Step 1: Probit analysis of employment

First, employment status is analyzed using data on all 2,000 graduates. This step needs information on both the employed and the not employed. Certification, experience, access to job fairs and so on are used to estimate an index related to each graduate's selection into employment.

The probit estimates are then used to compute the inverse Mills ratio.

Step 2: Wage regression including the selection correction term

Next, a wage regression is run on the 1,400 employed graduates whose actual wages are observed. Along with explanatory variables such as certification and experience, the inverse Mills ratio computed in Step 1 is added.

Yi = Xiᵀβ + δ·λi + ηi

Here λi is the inverse Mills ratio, and δ is a coefficient reflecting the relationship between the error terms of the selection and outcome equations. In this way the method tries to correct the differences in conditional means that arise from the selection process.

However, the usual OLS standard errors from the second-stage regression should not be used as they are. Because the inverse Mills ratio is itself a value estimated in Step 1, standard errors need a matching correction.

SECTION 7

What is the inverse Mills ratio?

The inverse Mills ratio is the value used in Heckman two-step estimation to correct for the mean of the conditional error term due to sample selection.

Under the standard Heckman model assumption that the error terms of the selection and outcome equations follow a bivariate normal distribution, the inverse Mills ratio for the employed can be computed as follows.

λi = φ(Ziᵀγ) ÷ Φ(Ziᵀγ)

Here φ is the probability density function of the standard normal distribution, and Φ is its cumulative distribution function.

012−2−1012λ ≈ 1.85Low employment probabilityλ ≈ 0.12High employment probabilityZγλ
Inverse Mills ratio curve

This value depends on the linear prediction estimated from the selection equation. For example, a person who had a relatively low probability of employment but was in fact employed gets a different selection correction value from a person who had a high probability of employment. The Heckman model uses these differences to correct the conditional mean of the wages observed in the sample of the employed.

However, the inverse Mills ratio does not reveal the actual wages of those not employed. Nor does adding it automatically remove every unobserved difference.

SECTION 8

How do you interpret actual Heckman results?

Suppose we applied Heckman two-step estimation to the graduate data above.

Step 1: Employment selection equation

VariableProbit coefficientStandard errorp-value
Has certification0.380.10< .001
Experience (years)0.120.04.003
Access to job fairs0.310.09< .001

Certification, experience and access to job fairs were all positively related to the likelihood of employment.

For example, a probit coefficient of 0.38 for certification means that, other things being equal, certification holders have a higher value on the latent index for selection into employment. How many percentage points higher the actual probability of employment is requires a separate marginal effect calculation.

Step 2: Selection-corrected wage equation

VariableCoefficient (B)Standard errorp-value
Has certification480150.001
Experience (per year)16042< .001
Inverse Mills ratio-360160.024

Wages and regression coefficients are in US dollars. The Step 2 standard errors are assumed to account for the selection correction.

Step 1 · ProbitHas certification0.38Experience (years)0.12Access to job fairs0.31Step 2 · Wage ($)Has certification+480Experience (1 yr)+160Inverse Mills ratio λ−360
Step 1 and Step 2 estimates

The coefficient for certification was 480. This means that, accounting for the other explanatory variables and the sample selection correction term, graduates with a certification had potential monthly wages that were on average $480 higher than those without.

The coefficient for experience is 160, so one more year of experience was associated with a potential monthly wage about $160 higher. The coefficient on the inverse Mills ratio was -360. Under the distributional assumptions of the standard Heckman model, this suggests a negative relationship between the error terms of the selection equation and the wage equation.

However, the specific selection mechanism should not be inferred from the sign of the inverse Mills ratio coefficient alone. In real research, the validity of the exclusion variable and the model's distributional assumptions should also be examined.

SECTION 9

How do you interpret differences between ordinary OLS and Heckman results?

Using the same graduate data, you can compare the results of an OLS regression on the employed only with the results of the Heckman selection model.

For example, suppose the results for certification are as follows.

MethodCertification coefficient
Ordinary OLS on the employed+$300
Heckman two-step estimation+$480
Ordinary OLS · employed only+$300Heckman two-step+$480Certification coefficient
OLS vs. Heckman estimates

In OLS, certification holders had monthly wages on average $300 higher than non-holders. In the Heckman model, on the other hand, after accounting for the selection process the difference was estimated at $480. This shows that the selection structure of the employed sample may have affected the regression coefficient.

However, the fact that the two coefficients differ does not by itself mean the Heckman result is more accurate. If the exclusion variable is invalid or the bivariate normality assumption does not hold, Heckman estimates can also be biased. So when interpreting the difference between the two methods, first examine the cause of sample selection and the validity of the model assumptions.

SECTION 10

Why does the exclusion restriction matter?

In the Heckman selection model, it is desirable to have a variable that affects the selection equation but has no direct effect on the outcome equation.

Such a variable is called an exclusion variable or identifying variable. In the example above, access to job fairs was included only in the selection equation. If the assumption holds that access to job fairs affects the likelihood of employment but has no direct effect on wages after employment, it helps identify the selection process.

But if job fairs provide information about high-paying companies or connect people directly to high-wage jobs, this variable can also affect wage levels. In that case, excluding it from the outcome equation may not be appropriate.

The Heckman model can be formally identified without an exclusion variable by relying on the nonlinearity of its distributional assumption. In that case, however, the estimates can depend too heavily on the functional form and distributional assumptions. So in real research it is important to have an exclusion variable that is convincing on theoretical and institutional grounds.

SECTION 11

How do the Tobit and Heckman models differ?

The Tobit and Heckman models can look similar, since both deal with limits on observing the dependent variable.

But the two methods assume different data-generating processes.

PartTobit modelHeckman Selection Model
Main problemDependent variable is censored at a boundaryOutcome observed only in the selected sample
Unobserved outcomeLatent value at the boundaryPotential outcome of those not selected
Typical exampleSpending observed as 0 when latent spending variable is 0 or belowWages observed only for the employed
Model structureLatent outcome and observation boundarySelection equation and outcome equation
Main interestEffects of explanatory variables on the latent variable and observed outcomeSelection-adjusted equation for the potential outcome

For example, if the survey includes households that spent $0 on arts and culture, and you assume a single latent variable determines spending, you could consider a Tobit model. If instead the wages of those not employed are unobserved and employment is related to wage determinants, you could consider the Heckman selection model.

The key is not whether the dependent variable has many $0 values, but understanding why the unobserved values arose.

SECTION 12

Cautions with the Heckman selection model

Do not apply the Heckman model to every kind of missing data.

The Heckman selection model deals with situations where the outcome is unobserved because of a particular selection process. It is not always a suitable method for simple data-entry omissions or missingness at random.

The variables in the selection equation matter.

Omitting important variables that affect employment, or including inappropriate ones, can distort the inverse Mills ratio and the selection correction.

Check the validity of the exclusion variable.

If a variable included only in the selection equation directly affects the outcome, interpreting the estimates becomes problematic.

Check the distributional assumption for the error terms.

The standard Heckman model relies on the assumption that the error terms of the selection and outcome equations follow a bivariate normal distribution. If this assumption is inappropriate, the estimates can be sensitive to it.

Compute the standard errors of two-step estimation correctly.

Because the inverse Mills ratio estimated in Step 1 is used in Step 2, it is not appropriate to report plain OLS standard errors as they are. Use corrected standard errors suited to Heckman estimation, or another inference method appropriate to the study design.

Do not confuse selection correction with causal effect estimation.

The Heckman model deals with sample selection, but it does not automatically solve other endogeneity problems in the explanatory variables. Even if certification holders are found to earn higher wages, concluding that this is the causal effect of certification itself may require an additional identification strategy.

SECTION 13

How do you report Heckman selection model results?

When reporting Heckman selection model results, present the number of people surveyed and the number whose outcome was observed, the variables in the selection and outcome equations, the rationale for choosing the exclusion variable, and the main coefficients and selection correction results together.

Summary of results

ItemResult
All graduates2,000
Wage observed1,400 employed
Wage not observed600 not employed
Estimation methodHeckman two-step estimation
Certification coefficient+$480
Experience coefficient+$160
Inverse Mills ratio coefficient-$360

Example report

A Heckman two-step selection model was applied to analyze the determinants of college graduates' wages. The sample consisted of 2,000 graduates, of whom wage information was observed for the 1,400 who were employed. In Step 1, a probit model with employment status as the dependent variable was estimated, and in Step 2 a monthly wage regression was run that included the inverse Mills ratio as the selection correction term.

Certification showed a statistically significant positive relationship with potential monthly wages (B = 480, SE = 150, p = .001). Experience was also positively related to monthly wages (B = 160, SE = 42, p < .001), and the coefficient on the inverse Mills ratio was -360 (SE = 160, p = .024). Under the assumptions of the standard Heckman model, these results suggest that the selection structure of the employed sample may be relevant to the wage regression. However, the selection-corrected results can be trusted only if the exclusion variable is valid and the distributional assumptions for the error terms are met.

In real research, the full results of the selection equation and the rationale for the exclusion variable should be presented together. Where possible, you can also compare results from maximum likelihood estimation or alternative models to check the stability of the main findings.

✓Wrap-up

The Heckman model accounts for the selection process that determines whether an outcome is observed.

The Heckman selection model is a method for dealing with the sample selection bias that can arise when the outcome is observed for only some people and that selection process is related to the outcome's error term.


For example, when analyzing graduates' wages, if only the wages of the employed are observed, you need to consider whether the unobserved factors that affect employment and those that affect wage levels are related to each other.

In Heckman two-step estimation, employment is first analyzed with a probit model, and the inverse Mills ratio is computed from it. The inverse Mills ratio is then included in the wage regression to correct the differences in conditional means that arise from the selection process.

However, the Heckman model does not solve every missing-data problem. The specification of the selection equation, the validity of the exclusion variable and the distributional assumptions for the error terms all matter, and correcting for sample selection does not automatically solve other endogeneity problems.

KEY TAKEAWAY

The key to the Heckman selection model is not to stop at analyzing those who were observed, but to build into the model the selection process that determines whose outcomes are observed.