AI Glossary / Statistics and probability / Intermediate

Heckman correction

Definition

The Heckman correction is a statistical method for estimating an outcome relationship when outcomes are observed for a nonrandomly selected subset of a population. Its classical form combines a model of selection with a linear outcome model and uses assumptions about their related errors to adjust estimation. The familiar two-step procedure adds an estimated inverse Mills ratio to the outcome regression.

What it means

Suppose an analyst studies assessment scores, but only people who finish an assessment receive recorded scores. Completion may depend on unmeasured motivation that also affects performance. A regression using completers alone can then describe a systematically selected group rather than the intended underlying relationship.
The correction models how records become observable. It does not recover missing outcomes without assumptions, and it should not be applied simply because some spreadsheet cells are empty.

How it works

Define S = 1 when the outcome is observed and S = 0 otherwise. The classical selection equation is S = 1 when z'g + v > 0. A probit model fitted to both selected and nonselected records estimates the selection index z'g.
Specify the underlying outcome equation y = x'b + u. In the classical model, u and v are jointly normally distributed conditional on the explanatory variables, with zero means, outcome-error standard deviation sigma, selection-error variance normalized to one, and correlation rho.
For selected records, the conditional mean becomes x'b + rho*sigma*m(z'g), where m(a) = phi(a)/Phi(a). Here phi is the standard normal density and Phi its cumulative distribution function. The added term captures the nonzero average outcome error induced by selection under these assumptions.
In the two-step estimator, first estimate the probit equation. Then compute m for selected observations and include it in their outcome regression. Use standard errors designed for the two-step procedure: ordinary regression errors ignore estimation of the generated regressor and the selected-sample variance structure.
A credible exclusion restriction is particularly valuable: a variable that influences observation but has no direct role in the outcome equation, conditional on the other covariates. Its relevance and exclusion require substantive justification. Formal identification from normality and nonlinearity alone can be fragile.
Full maximum likelihood offers another way to estimate the classical model. Neither estimation route makes incorrect distributional assumptions true. Examine selection coding, missing covariates, identification, sensitivity, and whether the target outcome is meaningfully defined for nonselected units.
Distinguish this problem from ordinary treatment-effect estimation. Correcting observation selection does not, by itself, remove confounding in a proposed causal relationship.

Three practical examples

  • An education analyst investigates learning gains when final assessments are missing for some enrolled learners.
  • A labor researcher studies offered wages when wages are recorded only for people who work.
  • An AI evaluation team considers whether voluntary submission of scored tasks creates selection related to unmeasured task difficulty.

Think of it this way

Think of judging a class from the students who stay for an optional final quiz. The correction tries to model both staying and scoring. Its usefulness depends on whether that model explains the selection process credibly, not merely on adding a mathematical adjustment.

Worked example

Consider an illustrative model with underlying expected score x'b = 50, outcome-error standard deviation sigma = 10, and error correlation rho = 0.4. For a covariate profile with selection index a = 0, the model gives selection probability Phi(0) = 0.5.
The normal density at zero is approximately 0.398942, so m(0) = 0.398942/0.5 = 0.797885. The selection adjustment is 0.4 x 10 x 0.797885 = 3.19154 points.
Consequently, the expected observed score for selected people with this profile is 53.19154, while the underlying population conditional mean remains 50. The difference arises from positive correlation between the two errors.
If rho were zero, the adjustment would be zero at the same selection probability. If rho were negative, its sign would reverse. These calculations use assumed parameters to explain the mechanism; they neither estimate a real correction nor establish that any particular dataset satisfies the model.

Illustrative case study

Fictional case: Cedar Learning runs a voluntary skills assessment and notices that employees who complete it differ from those who stop early. Its analyst retains enrollment records so completion can be modeled for everyone, rather than deleting incomplete assessments immediately.
The team considers whether randomly assigned reminder timing could help explain completion without affecting underlying skill. It investigates that assumption instead of treating the variable as automatically valid. A Heckman model is compared with simpler analyses and alternative specifications.
The report separates observed-completer predictions from estimates for the enrolled population. Because the result changes materially across defensible specifications, Cedar presents a sensitivity range and improves follow-up data collection before using the estimates for program planning.

Common misconceptions and mistakes

Common mistakes include calling every missing-data problem selection bias; using only selected records to fit the selection equation; treating missing outcomes as zero; choosing an exclusion variable solely because it is statistically significant; and reporting naive second-step standard errors.
A significant adjustment coefficient does not validate every modeling assumption. An insignificant coefficient does not prove that selection is harmless. Binary and count outcomes require appropriate extensions rather than automatic use of the classical continuous-outcome model.

Business use

Use the method when a clearly defined outcome is observed selectively and there is a defensible model of that process. A business report should identify the target population, selection mechanism, available records, exclusion argument, and sensitivity of conclusions. Better outcome collection may be more valuable than relying on a weakly identified correction.

People also ask

Is it the same as weighting?

No. The classical correction models correlated errors in selection and outcomes rather than simply reweighting observed records.

Does it prove causality?

No. Causal interpretation requires additional design and identification assumptions.

Can the correction increase or decrease estimates?

Yes; the direction depends on the model and selection relationship.

Check your understanding

If rho = 0 in the worked example, what is the predicted selected-group mean?

Answer: It is 50.

Why retain records without observed scores?

Answer: They provide information about selection.

Why question an exclusion variable?

Answer: It must plausibly affect observation without directly changing the outcome relationship being estimated.

Related terms

  • Probit model
  • Generated regressor
  • Sample selection bias
  • inverse Mills ratio
  • missing not at random
  • exclusion restriction
  • identifiability
  • maximum likelihood

Learn next

Learn how probit models represent observation probabilities, then compare assumptions behind selection models, weighting, and missing-data methods. Practice distinguishing underlying outcome predictions from predictions conditional on selection.

  • Missing data

More in Statistics and probability

  • Hazard ratio - A hazard ratio compares the instantaneous event rates of two groups among members who remain event-free at a particular time.
  • Healthy user bias - Healthy user bias occurs when people who choose a preventive intervention differ from nonusers in other health-related behaviors or characteristics that...
  • Heavy-tailed distribution - A heavy-tailed distribution assigns substantial probability to extreme values because its tail is not exponentially bounded.
  • Heterogeneity of variance - Heterogeneity of variance means that the populations or conditional distributions being compared have different variances.
  • Heterogeneous subsamples - Heterogeneous subsamples are distinct subsets within a dataset whose characteristics or statistical relationships differ.
  • Heteroskedasticity-consistent standard errors - Heteroskedasticity-consistent standard errors estimate regression-coefficient uncertainty while allowing error variance to differ across observations.

Sources

Stata, Heckman selection model: https://www.stata.com/manuals/rheckman.pdf Stata, Mills ratios and censoring direction: https://www.stata.com/support/faqs/statistics/inverse-mills-ratio/ Ian McCarthy, sample-selection teaching module hosted by the American Economic Association: https://www.aeaweb.org/content/file?id=1577

Previous: Hebbian learning Next: Helmholtz machine

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer