# Two stage models: Difference between Heckman models (to deal with sample selection) and Instrumental variables (to deal with endogenity)

I am trying to get my head around the difference between sample selection and endogeneity and in turn how Heckman models (to deal with sample selection) differ from instrumental variable regressions (to deal with endogeneity).

Is it correct to say that sample selection is a specific form of endogeneity, where the endogenous variable is the likelihood of being treated?

Also, it seems to me that both Heckman models and IV regression are 2-stage models, where the first stage predicts the likelihood of being treated - I assume they must differ in terms of what they are empirically doing, their objectives, and assumptions, but how?

To answer your first question, you are correct that sample selection is a specific form of endogeneity (See Antonakis et al. 2010 for a good basic review of endogeneity and common remedies), however you are not correct in saying that the likelihood of being treated is the endogenous variable, as it is the treatment variable itself ("non-random treatment assignment")--rather than the likelihood of being treated--that is endogenous in sample selection. Recall that endogeneity refers to a situation where you have incorrectly identified a causal relationship between factor X and factor Y, when the observed “relationship” is actually due to another factor Z that affects both X and Y. Put another way, given a regression model:

$y_i=\beta_0+\beta_1x_i+...+\epsilon_i$

endogeneity occurs when one or more than one of your predictors is related to the error term in the model. That is, when $Cov(x,\epsilon)\ne0$.

The common causes of endogenity include:

1. Omitted variables (some things we just can’t measure)
• Motivation/choice
• Ability/talent
• Self-selection
2. Measurement error (we would like to include $x_j$, but we only observe $x_j*$)
3. Simultaneity/bidirectionality (in children under 5, the relationship between the nutritional status indicator “weight for age” and whether the child had a recent illness might be simultaneous.

Different types of problems require slightly different solutions, which is where the difference between IV and Heckman-type corrections lie. Of course there are differences in the underlying mechanics of these methods, but the premise is the same: which is to remove endogeneity, ideally via an exclusion restriction, i.e. one or more instruments in the case of IV or a variable that affects selection but not the outcome in the case of Heckman.

To answer your second question, you have to think about the differences in the types of data limitations that gave rise to the development of these solutions. I like to think that the instrumental variable (IV) approach is used when one or more variables is endogenous, and there are simply no good proxies to stick in the model to remove the endogeneity, but the covariates and outcomes are observed for all observations. Heckman-type corrections, on the other hand, are used when you have truncation, i.e. the information is not observed for those in sample where the value of the selection variable == 0.

The instrumental variable (IV) approach

Think of the classic econometric example for IV regression with the two-stage least squares (2SLS) estimator: the effect of education on earnings.

$Earnings_i=\beta_0+ \beta_1OwnEd_i + \epsilon_i$ (1)

Here level of educational achievement is endogenous because it is determined partly by the individual's motivation and ability, both of which also affect a person's earnings. Motivation and Ability are not typically measured in household or economic surveys. Equation 1 can therefore be written to explicitly include motivation and ability:

$Earnings_i=\beta_0+ \{\beta_1OwnEd_i + \beta_2Motiv_i + \beta_3Abil_i\} + \epsilon_i$ (2)

Since $Motiv$ and $Abil$ are not actually observed, Equation 2 can be written as:

$Earnings_i=\beta_0+ \beta_1OwnEd_i + u_i$ (3),

where $u_i=\beta_2Motiv_i + \beta_3Abil_i + \epsilon_i$ (4).

Therefore a naïve estimation of the effect of education on earnings via OLS would be biased. This part you already know.

In the past, people have used parents' education as instruments for the subject's own level of education, as they fit the 3 requirements for a valid instrument ($z$):

1. $z$ must be related to the endogenous predictor – $𝐶𝑜𝑣(𝑧,𝑥)≠0$,
2. $z$ cannot be directly related to the outcome – $𝐶𝑜𝑣(𝑧,𝑦)=0$, and
3. $z$ cannot be related to the unobservable (u) characteristic (that is, $z$ is exogenous) – $𝐶𝑜𝑣(𝑧,𝑢)=0$

When you estimate the subject's education ($OwnEd$) using parents' education ($MomEd$ and $DadEd$) at first stage and use the predicted value of education ($\widehat{OwnEd}$) to estimate $Earnings$ at second stage, you are (in very simplistic terms), estimating $Earnings$ based on the portion of $OwnEd$ that is not determined by motivation/ability.

Heckman-type corrections

As we have established before, non-random sample selection is a specific type of endogeneity. In this case, the omitted variable is how people were selected into the sample. Typically, when you have a sample selection problem, your outcome is observed only for those for whom the sample selection variable == 1. This problem is also known as "incidental truncation," and the solution is commonly known as a Heckman correction. The classic example in econometrics is the wage offer of married women:

$Wage_i = \beta_0 + \beta_1Educ_i + \beta_2Experience_i + \beta_3Experience^2_i+\epsilon_i$ (5)

The problem here is that $Wage$ is only observed for women who worked for wages, so a naïve estimator would be biased, as we do not know what the wage offer is for those who do not participate in the labor force, the selection variable $s$. Equation 5 can be rewritten to show that it is jointly determined by two latent models:

$Wage_i^* = X\beta^\prime+\epsilon_i$ (6)

$LaborForce_i^* = Z\gamma^\prime+\nu_i$ (7)

That is, $Wage = Wage_i^*$ IFF $LaborForce_i^*>0$ and $Wage = .$ IFF $LaborForce_i^*\leq 0$

The solution here is therefore to predict the likelihood of participation in the labor force at first stage using a probit model and the exclusion restriction (the same criteria for valid instruments apply here), calculate the predicted inverse Mills ratio ($\hat{\lambda}$) for each observation, and in second stage, estimate the wage offer using the $\hat{\lambda}$ as a predictor in the model (Wooldridge 2009). If the coefficient on $\hat{\lambda}$ is statistically equal to zero, there is no evidence of sample selection (endogeneity), and OLS results are consistent and can be presented. If the coefficient on $\hat{\lambda}$ is statistically significantly different from zero, you will need to report the coefficients from the corrected model.

References

1. Antonakis, John, Samuel Bendahan, Philippe Jacquart, and Rafael Lalive. 2010. “On Making Causal Claims: A Review and Recommendations.” The Leadership Quarterly 21 (6): 1086–1120. doi:10.1016/j.leaqua.2010.10.010.
2. Wooldridge, Jeffrey M. 2009. Introductory Econometrics: A Modern Approach. 4th ed. Mason, OH, USA: South-Western, Cengage Learning.
• In Heckman-type correction, how to interprete inverse Mills ratio values for each observation? Does it says the number of people who will work from the non-working population at a given moment? – Quirik Apr 23 '16 at 20:34

One should make a distinction between the specific Heckman sample selection model (where only one sample is observed) and Heckman-type corrections for self-selection, which can also work for the case where the two samples are observed. The latter is referred to as control function approach, and amounts to include into your second stage a term controlling for the endogeneity.

Let us have a standard case with an endogeneous dummy variable D, an instrument Z:

$$Y= \beta + \beta_1 D +\epsilon$$ $$D= \gamma + \gamma_1 Z +u$$

Both approaches run a first stage (D on Z). IV uses a standard OLS (even if D is a dummy) Heckman uses a probit. But besides this, the main difference is on the way they use this first stage into the main equation:

• IV: break the endogeneity by decomposing D into parts uncorrelated with $\epsilon$, given by the prediction of D: $Y= \beta + \beta_1 \hat{D}+\epsilon$
• Heckman: model the endogeneity: keep the endogenous D, but add a function of the predicted values of the first stage. For this case, it is a pretty complicated function: $Y= \beta + \beta_1 D + \beta_2 \left[\lambda(\hat{D})-\lambda(-\hat{D})\right ] +\epsilon$ where $\lambda()$ is the inverse Mills ratio

The advantage of the Heckman procedure is that it provides a direct test for endogeneity: the coefficient $\beta_2$. On the other side, the Heckman procedure relies on the assumption of joint normality of the errors, while the IV does not make any such assumption.

So you have the standard story that with normal errors, the control function will be more efficient (especially if ones uses the MLE instead of the two-step shown here) than the IV, but that if the assumption does not hold, IV would be better. As researchers have become more suspicious about the assumption of normality, the IV is used more often.

From Heckman, Urzua and Vytlacil (2006):

Example of selection bias: Consider the effects of a policy on the outcome of a country (e.g. GDP). If the countries that would have done well in terms of the unobservable even in the absence of the policy are the ones that adopt the policy, then the OLS estimates are biased.

Two main approaches have been adopted to solve this problem: (a) selection models and (b) instrumental variable models.

The selection approach models levels of conditional means. The IV approach models the slopes of the conditional means. IV does not identify the constants estimated in selection models.

The IV approach does not condition on D (the treatment). The selection (control function) estimator identifies the conditional means using control functions.

When using control functions with curvature assumptions, one does not require an exclusion restriction (does not require $$Z\neq X$$) in the selection model. By assuming a functional form for the distribution of the error terms, one rules out the possibility that the conditional mean of the outcome equation equals the conditional control function, and thus you can correct for selection without exclusion restrictions. See also Heckman and Navarro (2004).