Two-Stage Least Squares (2SLS)
A method that uses an instrumental variable to estimate a causal effect while accounting for the endogeneity between years of education and wages.
Do people with more years of college education also earn more? Can you tell whether higher wages are due to the years of education or to underlying ability or family background? If having a college near home affects how long people stay in school, could you use that in the analysis?
When an explanatory variable is tangled up with other, unobserved factors, two-stage least squares (2SLS) is the method that uses an instrumental variable to estimate the change in the explanatory variable and then uses that change to find the effect on the outcome.
Ordinary regression estimates the conditional relationship between years of education and wages, but if there are omitted variables such as ability or family background, or possible reverse causation in the choice of education, it's hard to read that coefficient directly as a causal effect. 2SLS goes through two rounds of estimation to use the part of the endogenous years of education that is linked to the instrument. The instrument must, however, satisfy relevance and the exclusion restriction.
2SLS is used in labor economics, the economics of education, health and policy evaluation, and other fields. In this article we'll take the distance from home to a college as a candidate instrument to look at the relationship between years of education and wages, and cover what the two stages mean, the key assumptions, how to read the results table, and how it differs from OLS and instrumental variable analysis.
What is two-stage least squares (2SLS)?
It estimates an endogenous explanatory variable's effect from the variation explained by an instrument.
2SLS is the standard estimation method for linear instrumental variable models. In stage 1, years of education, the endogenous variable, is explained by the instrument and appropriate control variables; in stage 2, the variation in years of education explained by the instrument is used to estimate the effect on wages.
The intuition is often introduced by plugging the predicted years of education into a second regression, but the actual standard errors and confidence intervals must be computed with a dedicated estimator that reflects the whole 2SLS estimation process. You should not use the second-stage standard errors from simply running ordinary regression twice.
Why do you need 2SLS?
Because the correlation between years of education and wages alone can't tell you the causal effect of education.
Years of education can be associated with a person's ability, academic inclination, family finances, regional characteristics, and so on. If these factors also affect wages, the OLS coefficient on years of education can include influences other than the effect of education.
For example, living near a college may make people more likely to stay in school longer, but if areas close to colleges are themselves places with higher incomes or better job opportunities, distance may not be a valid instrument. So the reason for using 2SLS and the reason the instrument holds up need to be explained separately.
How does 2SLS work?
Stage 1 finds the instrument-related variation in X, and stage 2 estimates the effect on Y.
Stage 2: log hourly wage = constant + instrument-explained years of education × effect + controls × coefficients + error
In practice, 2SLS uses the variation obtained by projecting years of education onto the instrument and the exogenous control variables. The same set of control variables must be used in both stages, and the predicted values in stage 2 are not simply treated as if they were new observations.
Real-world example: the effect of years of education on wages
We use access to college as a candidate instrument in hypothetical data on adult workers.
Assume a study that observed 600 hypothetical adult workers. Years of education is defined as the total years of formal schooling, and the wage as the natural log of the hourly wage. The candidate instrument is the distance from the place a person lived as a teenager to the nearest four-year college. All numbers are examples for learning.
| Item | Measurement example | Role |
|---|---|---|
| Years of education | Years of formal schooling completed | Possibly endogenous explanatory variable X |
| Log hourly wage | Natural log of the hourly wage | Outcome Y |
| Distance to the nearest college | km from teenage home | Candidate instrument Z |
| Age, sex, regional characteristics | Observed background factors | Candidate exogenous controls |
| Analysis sample | 600 workers | Unit of observation |
Access to college may be related to the opportunity to go on to school, but a region's industrial structure or educational environment may also affect wages directly. So here we only explain the procedure for using a candidate instrument, and we don't assume the exclusion restriction has been verified.
What conditions does 2SLS require?
The instrument has to be strong and valid before the estimate can be interpreted causally.
| Key condition | Meaning | What to examine in the example |
|---|---|---|
| Relevance | Instrument Z is related to years of education X | First-stage relationship between distance to college and years of schooling |
| Independence | Z is independent of unobserved confounders that affect the outcome | Family background, choice of location, labor market structure |
| Exclusion restriction | Z affects wages through no path other than years of education | Regional development and job opportunities near colleges |
| Functional form | Linear model, with suitable definitions of variables and controls | Check the units of log wages and years of schooling |
| Additional assumptions such as monotonicity | Needed to interpret specific causal effects such as the LATE | Direction of education choices in response to changes in distance |
In what order do you run a 2SLS analysis?
Choose the instrument, check first-stage strength, estimate the second-stage effect, then run diagnostics.
① Define the variables and the causal assumptions
Set years of education (X), log wages (Y), distance to college (Z), and background controls, and examine other paths through which Z might affect Y.
② Estimate the first-stage regression
Explain years of schooling with distance to college and the controls. Check information on the relevance and strength of the instrument, such as the partial F statistic.
③ Estimate the effect in the second stage
Use a dedicated IV/2SLS estimator to produce the effect of years of education on wages along with correct standard errors and confidence intervals.
④ Compare with ordinary regression and report the limitations
Compare the OLS and IV estimates, but don't conclude that 2SLS must be right just because the estimates differ. Address weak instruments and possible violations of the exclusion restriction separately.
What do you check in the first-stage regression?
See whether distance to college creates enough variation in years of education.
| First-stage item | Hypothetical result for learning | How to read it |
|---|---|---|
| Coefficient on distance to college | −0.12 years/km | Each additional 1 km of distance goes with fewer years of education |
| Partial F statistic | 16.4 | A measure of the strength of first-stage relevance |
| Sample size | 600 | Same observations as in the second stage |
F = 16.4 is a hypothetical value for illustration. An F above 10 does not always mean you're safe; consider weak-instrument diagnostics and robust inference suited to the conditions of the analysis, such as heteroskedasticity or clustered data.
How do you interpret the second-stage results?
In a log wage model, the effect of one more year of education can be converted to a percentage.
| Estimation method | Coefficient for one more year of education | 95% confidence interval (hypothetical) |
|---|---|---|
| Ordinary OLS | 0.065 | [0.049, 0.081] |
| 2SLS | 0.091 | [0.018, 0.164] |
The hypothetical 2SLS coefficient of 0.091 can be read as hourly wages being about 9.5% higher for each additional year of education (exp(0.091) − 1 ≈ 0.095). As a simple approximation, it's about 9.1%. The numbers here are illustrative values, not results from an actual fit.
To call this a causal effect, the instrumental variable assumptions must hold. And if the effect differs from person to person, the IV result may be a local effect for the group that responds to the instrument, so don't generalize it as an average effect for everyone.
What graph do you use to compare OLS and 2SLS results?
Look not just at the difference in coefficients but at the width of the confidence intervals and the uncertainty.
The 2SLS confidence interval can be wider than the OLS one. That's because using only the limited variation that comes through the instrument can lower the precision of the estimate. A bigger coefficient doesn't simply mean a better analysis.
What to watch out for in 2SLS
You need to check not just the computations but whether the instrument is appropriate and how inference is done.
Could distance to college affect wages directly?
If areas near colleges have more jobs or higher wages, distance can be linked to wages through more than years of education. Alternative paths like this are a major threat to the exclusion restriction.
Are you using a weak instrument?
If first-stage relevance is weak, the 2SLS coefficient and the usual confidence intervals can become very unstable. Consider diagnostics suited to your data structure and tests that are robust to weak instruments.
Did you calculate the standard errors correctly?
Don't run the second stage as a separate OLS and report its standard errors as they are. Use a 2SLS estimator with appropriate heteroskedasticity-robust or cluster-robust standard errors.
Are the estimated population and the scope of generalization clear?
It may be the effect for the group whose education choices change with access to college. Whether it generalizes to the whole population has to be judged separately, based on the study design and identifying assumptions.
How does it differ from other analyses?
IV is an identification strategy, and 2SLS is the standard estimation method for carrying it out.
| Method | Purpose | What sets it apart |
|---|---|---|
| OLS regression | Estimates the observed education–wage relationship | With endogeneity, a causal interpretation is hard |
| Instrumental variable (IV) approach | Tries to identify the causal effect from exogenous variation | Emphasizes instrument relevance, independence, and the exclusion restriction |
| Two-Stage Least Squares (2SLS) | Estimates the coefficients of a linear IV model | Needs the two-stage procedure and correct inference |
| Regression with controls | Adjusts for observed background factors | Doesn't automatically remove unobserved confounding |
| Difference-in-differences (DID) | Compares the before–after change in two groups around a policy | Relies on other assumptions, such as parallel trends |
You don't have to think of instrumental variable analysis and 2SLS as entirely separate, competing methods. 2SLS is one of several estimators you can use once a suitable instrumental variable design is in place.
How do you report 2SLS results?
Present first-stage strength, the second-stage effect, and the assumptions and limitations together.
In a paper or report, lay out the variable definitions, the rationale for the instrument, the sample and controls, first-stage relevance and strength diagnostics, the 2SLS coefficient and confidence interval, how standard errors were handled, the comparison with OLS, and the weak points of the exclusion restriction.
To account for possible endogeneity between years of education and wages, two-stage least squares (2SLS) was examined using the distance from teenage home to college as a candidate instrument. In the hypothetical results for learning, the first-stage partial F statistic was 16.4, and the 2SLS coefficient on years of education was 0.091 (95% CI [0.018, 0.164]). This corresponds to hourly wages about 9.5% higher for each additional year of education. However, these values are hypothetical figures set up to explain the analysis, and a causal interpretation requires separate evidence for the exogeneity of access to college and the exclusion restriction.
Don't write that a causal effect has been proven just because relevance was confirmed. In particular, discuss other paths through which regional differences in access to college could affect wages.
Where can you use 2SLS?
Use it in studies that have both an endogeneity problem and a convincing candidate instrument.
| Field | Effect of interest | Candidate instruments to examine |
|---|---|---|
| Education & labor | Effect of years of education on wages | Access to college, institutional changes |
| Health economics | Effect of treatment use on health | Exogenous variation in the supply of health services |
| Transportation | Effect of transit access on car use | Historical placement of infrastructure |
| Policy evaluation | Effect of participation or support on outcomes | Eligibility thresholds or random assignment |
The instruments in the table are only candidates a study could examine. Whether the exclusion restriction holds, and for whom the effect is identified, has to be checked anew in each study.
The heart of 2SLS is not the trick of running two regressions but how you interpret the variation the instrument creates.
To interpret the relationship between years of education and wages causally, you need to examine both the estimation procedure and the identifying assumptions.
Just because people with more years of education earn more, you can't immediately conclude that adding years of education will raise wages by that much. Two-stage least squares is an estimation method that uses variation linked to an instrument to deal with the endogeneity of years of education. The key is that stage 1 checks how much distance to college explains years of education, and stage 2 estimates the relationship with wages based on that variation.
But finishing the two stages of calculation doesn't automatically confirm a causal effect, because distance to college may also be related to the local labor market, family background, and where people choose to live. So researchers need to examine not only the instrument's relevance and strength but also independence and the exclusion restriction, and to be clear about the confidence interval and the scope of what is being estimated. Without a valid instrument, it is better not to claim a causal relationship from 2SLS numbers alone.
2SLS estimates the effect on wages using the variation in years of education explained by the instrument. First-stage relevance and weak-instrument diagnostics are necessary, but they don't replace independence and the exclusion restriction. Report the 2SLS estimate, confidence interval, and standard errors together with the limits of a causal interpretation.