In statistics, econometrics, epidemiology and related disciplines, the quasi-experimental method of instrumental variables (IV) is used to estimate causal relationships when controlled experiments are not feasible or when a treatment is not successfully delivered to every unit in a randomized experiment. Intuitively, IVs are used when an explanatory (also known as independent or predictor) variable of interest is correlated with the error term (endogenous), in which case ordinary least squares and ANOVA give biased results. When used, a valid instrument changes the explanatory variable (the variable correlated with the endogenous variable) but has no independent effect on the dependent variable and is not correlated with the error term, thus allowing a researcher or analyst to uncover the true causal effect of the explanatory variable on the dependent variable.

Instrumental variable methods allow for consistent estimation when the explanatory variables (covariates) are correlated with the error terms in a regression model. Such correlation may occur when: changes in the dependent variable change the value of at least one of the covariates ("reverse" causation), there are omitted variables that affect both the dependent and explanatory variables, or the covariates are subject to measurement error. Explanatory variables that suffer from one or more of these issues in the context of a regression are sometimes referred to as endogenous. In this situation, ordinary least squares produces biased and inconsistent estimates. However, if an instrument is available, consistent estimates may still be obtained. An instrument is a variable that does not itself belong in the explanatory equation but is correlated with the endogenous explanatory variables, conditionally on the value of other covariates.

In linear models, there are two main requirements for using IVs: The instrument must be correlated with the endogenous explanatory variables, conditionally on the other covariates. If this correlation is strong, then the instrument is said to have a strong first stage. A weak correlation may provide misleading inferences about parameter estimates and cause the standard errors in the second stage to be larger than the ordinary least squares estimates.https://www.stata.com/meeting/5nasug/wiv.pdf The instrument cannot be correlated with the error term in the explanatory equation, conditionally on the other covariates. In other words, the instrument cannot suffer from the same problem as the original predicting variable. If this condition is met, then the instrument is said to satisfy the exclusion restriction.

Example Informally, in attempting to estimate the causal effect of some variable X ("covariate" or "explanatory variable") on another Y ("dependent variable"), an instrument is a third variable Z which affects Y only through its effect on X.

For example, suppose a researcher wishes to estimate the causal effect of smoking (X) on general health (Y). Correlation between smoking and health does not imply that smoking causes poor health because other variables, such as depression, may affect both health and smoking, or because health may affect smoking. It is not possible to conduct controlled experiments on smoking status in the general population. The researcher may attempt to estimate the causal effect of smoking on health from observational data by using the tax rate for tobacco products (Z) as an instrument for smoking. The tax rate for tobacco products is a reasonable choice for an instrument because the researcher assumes that it can only be correlated with health through its effect on smoking. If the researcher then finds tobacco taxes and state of health to be correlated, this may be viewed as evidence that smoking causes changes in health.

History The first use of an instrument variable occurred in a 1928 book by Philip G. Wright, best known for his excellent description of the production, transport and sale of vegetable and animal oils in the early 1900s in the United States. In 1945, Olav Reiersøl applied the same approach in the context of errors-in-variables models in his dissertation, giving the method its name.

Wright attempted to determine the supply and demand for butter using panel data on prices and quantities sold in the United States. The idea was that a regression analysis could produce a demand or supply curve because they are formed by the path between prices and quantities demanded or supplied. The problem was that the observational data did not form a demand or supply curve as such, but rather a cloud of point observations that took different shapes under varying market conditions. It seemed that making deductions from the data remained elusive.

The problem was that price affected both supply and demand so that a function describing only one of the two could not be constructed directly from the observational data. Wright correctly concluded that he needed a variable that correlated with either demand or supply but not both – that is, an instrumental variable.

After much deliberation, Wright decided to use regional rainfall as his instrumental variable: he concluded that rainfall affected grass production and hence milk production and ultimately butter supply, but not butter demand. In this way he was able to construct a regression equation with only the instrumental variable of price and supply.Wooldridge, J.: Introductory Econometrics. South-Western, Scarborough, Kanada, 2009.

Formal definitions of instrumental variables, using counterfactuals and graphical criteria, were given by Judea Pearl in 2000. Angrist and Krueger (2001) present a survey of the history and uses of instrumental variable techniques. Notions of causality in econometrics, and their relationship with instrumental variables and other methods, are discussed by Heckman (2008).

Theory While the ideas behind IV extend to a broad class of models, a very common context for IV is in linear regression. Traditionally, an instrumental variable is defined as a variable that is correlated with the independent variable and uncorrelated with the "error term" in the linear equation

is a vector. is a matrix, usually with a column of ones and perhaps with additional columns for other covariates. Consider how an instrument allows to be recovered. Recall that OLS solves for such that (when we minimize the sum of squared errors, , the first-order condition is exactly ). If the true model is believed to have due to any of the reasons listed above—for example, if there is an omitted variable which affects both and separately—then this OLS procedure will not yield the causal impact of on . OLS will simply pick the parameter that makes the resulting errors appear uncorrelated with .

Consider for simplicity the single-variable case. Suppose we are considering a regression with one variable and a constant (perhaps no other covariates are necessary, or perhaps we have partialed out any other relevant covariates):

In this case, the coefficient on the regressor of interest is given by . Substituting for gives

where is what the estimated coefficient vector would be if . In this case, it can be shown that is an unbiased estimator of . If in the underlying model that we believe, then OLS gives an inconsistent estimate which does not reflect the underlying causal effect of interest. IV helps to fix this problem by identifying the parameters not based on whether is uncorrelated with , but based on whether another variable is uncorrelated with . If theory suggests that is related to (the first stage) but uncorrelated with (the exclusion restriction), then IV may identify the causal parameter of interest where OLS fails. Because there are multiple specific ways of using and deriving IV estimators even in just the linear case (IV, 2SLS, GMM), we save further discussion for the Estimation section below.

Graphical definition IV techniques have been developed among a much broader class of non-linear models. General definitions of instrumental variables, using counterfactual and graphical formalism, were given by Pearl (2000; p. 248). The graphical definition requires that Z satisfy the following conditions:

where stands for d-separation and stands for the graph in which all arrows entering X are cut off.

The counterfactual definition requires that Z satisfies

where Yx stands for the value that Y would attain had X been x and stands for independence.

If there are additional covariates W then the above definitions are modified so that Z qualifies as an instrument if the given criteria hold conditional on W.

The essence of Pearl's definition is: The equations of interest are "structural", not "regression". The error term U stands for all exogenous factors that affect Y when X is held constant. The instrument Z should be independent of U. The instrument Z should not affect Y when X is held constant (exclusion restriction). The instrument Z should not be independent of X.

These conditions do not rely on specific functional form of the equations and are applicable therefore to nonlinear equations, where U can be non-additive (see Non-parametric analysis). They are also applicable to a system of multiple equations, in which X (and other factors) affect Y through several intermediate variables. An instrumental variable need not be a cause of X; a proxy of such cause may also be used, if it satisfies conditions 1–5. The exclusion restriction (condition 4) is redundant; it follows from conditions 2 and 3.

Selecting suitable instruments

Since U is unobserved, the requirement that Z be independent of U cannot be inferred from data and must instead be determined from the model structure, i.e., the data-generating process. Causal graphs are a representation of this structure, and the graphical definition given above can be used to quickly determine whether a variable Z qualifies as an instrumental variable given a set of covariates W. To see how, consider the following example.

Suppose that we wish to estimate the effect of a university tutoring program on grade point average (GPA). The relationship between attending the tutoring program and GPA may be confounded by a number of factors. Students who attend the tutoring program may care more about their grades or may be struggling with their work. This confounding is depicted in the Figures 1–3 on the right through the bidirected arc between Tutoring Program and GPA. If students are assigned to dormitories at random, the proximity of the student's dorm to the tutoring program is a natural candidate for being an instrumental variable.

However, what if the tutoring program is located in the college library? In that case, Proximity may also cause students to spend more time at the library, which in turn improves their GPA (see Figure 1). Using the causal graph depicted in the Figure 2, we see that Proximity does not qualify as an instrumental variable because it is connected to GPA through the path Proximity Library Hours GPA in . However, if we control for Library Hours by adding it as a covariate then Proximity becomes an instrumental variable, since Proximity is separated from GPA given Library Hours in .

Now, suppose that we notice that a student's "natural ability" affects his or her number of hours in the library as well as his or her GPA, as in Figure 3. Using the causal graph, we see that Library Hours is a collider and conditioning on it opens the path Proximity Library Hours GPA. As a result, Proximity cannot be used as an instrumental variable.

Finally, suppose that Library Hours does not actually affect GPA because students who do not study in the library simply study elsewhere, as in Figure 4. In this case, controlling for Library Hours still opens a spurious path from Proximity to GPA. However, if we do not control for Library Hours and remove it as a covariate then Proximity can again be used an instrumental variable.

Estimation