Instrumental Variables (2SLS) Regression
Estimate a regression with endogenous regressors using instruments. You get 2SLS estimates next to OLS, first-stage strength (F and partial R²), the Sargan test of over-identifying restrictions and the Wu-Hausman test of endogeneity.
Updated · By Bibin XavierData 500 × 11
| IDnumeric | Log_Wagenumeric | Educationnumeric | Experiencenumeric | Femalenumeric · coded | Unionnumeric · coded | Distance_Collegenumeric | Father_Educnumeric | Employednumeric · coded | Doctor_Visitsnumeric | Agenumeric |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 2.47 | 12 | 0 | 0 | 0 | 5.7 | 9 | 0 | 1 | 18 |
| 2 | 1.83 | 14 | 21 | 0 | 1 | 0 | 9 | 1 | 0 | 41 |
| 3 | 2.56 | 11 | 12 | 0 | 0 | 0 | 12 | 0 | 0 | 29 |
| 4 | 2.02 | 10 | 14 | 0 | 0 | 27.2 | 13 | 0 | 0 | 30 |
| 5 | 1.75 | 12 | 21 | 1 | 1 | 21.6 | 9 | 1 | 1 | 39 |
| 6 | 2.73 | 10 | 10 | 0 | 0 | 0 | 9 | 1 | 0 | 26 |
| 7 | 1.54 | 11 | 14 | 1 | 0 | 13.8 | 10 | 0 | 0 | 31 |
| 8 | 1.46 | 11 | 9 | 1 | 1 | 7.2 | 8 | 1 | 2 | 26 |
Variables and options
Results
500 rows · example data2SLS estimates (Conventional standard errors)
| Variable | 2SLS coefficient | SE | t | p | 95% CI | OLS coefficient | OLS SE |
|---|---|---|---|---|---|---|---|
| Constant | 1.0411 | 0.3705 | 2.810 | .005 | [0.3131, 1.7691] | 0.8557 | 0.1685 |
| Experience | 0.0222 | 0.0035 | 6.390 | < .001 | [0.0154, 0.0290] | 0.0220 | 0.0035 |
| Female | -0.1989 | 0.0515 | -3.864 | < .001 | [-0.3001, -0.0978] | -0.1992 | 0.0514 |
| Education (endogenous) | 0.0920 | 0.0310 | 2.965 | .003 | [0.0310, 0.1530] | 0.1078 | 0.0134 |
Note. Instruments: Distance_College, Father_Educ. N = 500.
First-stage diagnostics
| Endogenous regressor | F (excluded instruments) | p | Partial R² | Strength |
|---|---|---|---|---|
| Education | F(2, 495) = 56.42 | < .001 | .186 | Strong (F ≥ 10) |
Note. The rule of thumb F ≥ 10 follows Staiger and Stock (1997); see Stock and Yogo (2005) for exact critical values.
Specification tests
| Test | Null hypothesis | Statistic | p |
|---|---|---|---|
| Wu-Hausman | Regressors are exogenous (OLS is consistent) | F(1, 495) = 0.325 | .569 |
| Sargan | Instruments are valid (over-identifying restrictions hold) | χ²(1) = 0.013 | .910 |
Interpretation
The 2SLS estimate for Education is 0.092 (OLS: 0.108). The instruments are strong. The Wu-Hausman test does not reject exogeneity, so OLS would be consistent and more efficient. The Sargan test does not reject instrument validity.
How to cite this tool
Using these results in a thesis, journal article, report or class assignment? Please cite this free tool so others can find it. It keeps the site free.
APA 7
Xavier, B. (2026). Instrumental Variables (2SLS) Regression [Web application]. FreeStatisticalTools.com. https://freestatisticaltools.com/instrumental-variables-2sls-regression/
BibTeX
@software{xavier_iv2slsregression_2026,
author = {Xavier, Bibin},
title = {Instrumental Variables (2SLS) Regression},
publisher = {FreeStatisticalTools.com},
year = {2026},
url = {https://freestatisticaltools.com/instrumental-variables-2sls-regression/},
note = {Web application}
}Suggested sentence for your methods section: “The analysis was carried out with the free Instrumental Variables (2SLS) Regression tool on FreeStatisticalTools.com (Xavier, 2026).”
What is instrumental variables (2SLS) regression?
Two-stage least squares corrects for endogenous regressors, those correlated with the error term, by using instruments that affect the outcome only through the endogenous regressor. The first stage predicts the endogenous regressor from the instruments; the second stage uses those predictions.
When to use instrumental variables (2SLS) regression
Use 2SLS when a regressor is correlated with the error term, because of omitted variables, simultaneity or measurement error, and you have instruments that affect the outcome only through that regressor.
Assumptions
- Relevance: instruments are strongly correlated with the endogenous regressor (first-stage F ≥ 10).
- Exogeneity: instruments are uncorrelated with the structural error (untestable when exactly identified).
How to use this tool
- Enter your data. Paste columns from Excel, Google Sheets or SPSS with variable names in the first row, or upload a CSV or Excel file. The example data shows the expected layout.
- Choose the variables. Select the dependent variable, endogenous regressors, exogenous controls and excluded instruments.
- Set the options. Fill in standard errors.
- Read the results. Results update automatically. Read the plain-English interpretation, then use Copy table to paste APA-style tables into Word and Copy for the results sentence.
How to report instrumental variables (2SLS) regression in APA style
Report 2SLS and OLS estimates side by side, first-stage F statistics, and the Wu-Hausman and Sargan tests.
Frequently asked questions
What makes a good instrument?
It must be relevant (strongly correlated with the endogenous regressor, first-stage F ≥ 10) and exogenous (uncorrelated with the error in the outcome equation).
What does the Wu-Hausman test show?
Whether OLS and 2SLS differ significantly. If it rejects, the regressor is endogenous and 2SLS is preferred; if not, OLS is consistent and more efficient.
What is the Sargan test?
A test of over-identifying restrictions, available when there are more instruments than endogenous regressors. A significant result suggests at least one instrument is invalid.
Related tools
Browse all categories
Data cleaning and preparation · Describe and explore · Compare means · Nonparametric tests · Correlation and regression · Bayesian statistics · Categorical data · Reliability and agreement · Multivariate analysis · Structural equation modeling · Econometrics and time series · Panel data and causal inference · Marketing and decision research · Survival, clinical and meta-analysis · Study planning and calculators · PLS-SEM