5 Ivmf
5 Ivmf
Instrumental Variables
matrix-free
1 Introduction
2 Canonical Examples
yi = γ0 + xi1 β1 + xi2 β2 + vi
which conforms with standard OLS assumptions. Suppose that the vari-
able x2 is not observed. The estimated regression model is therefore
yi = γ0 + xi1 β1 + ui
yi = γ0 + β1 x∗i + u∗i
1 Instead of estimating the single structural equations directly by IV it is possible
to formulate and estimate a so-called reduced form of the above equation system. The
RHS of the reduced form equations consists of exogenous variables only. If the system
is identified, the parameters in the structural form can be deduced from the estimated
parameters in the reduced form.
3 Short Guides to Microeconometrics
which conforms the standard OLS assumptions. Suppose that the variable
x∗ is only observed with an error
xi = x∗i + vi
where the error v is uncorrelated with x∗ and with u∗i . The estimated
regression model uses x as a proxy for x∗
yi = γ0 + β1 xi + ui
where yi is the dependent variable, xi1 , ..., xiK are K endogenous regres-
sors wi1 , ..., wiM are M exogenous regressors, βk and γm are K + M + 1
parameters and ui is the error term. Each observation is furthermore
described by L exogenous variables zi1 , ..., ziL , called the instruments or
excluded instruments.
The data generation process (dgp) is fully described by the following
set of assumptions:
IV1: Linearity
yi = γ0 + β1 xi1 + ... + βK xiK + γ1 wi1 + ... + γM wiM + ui , E[ui ] = 0
Instrumental Variables 4
IV2: Independence
{xi1 , ..., xiK , wi1 , ..., wiM , zi1 , ..., ziL , yi }N
i=1 i.i.d.
IV2 means that regressors, instruments and dependent variables are inde-
pendent across observations. In practice guaranteed by random sampling.
IV3: Exogeneity
∀m : Cov[wim , ui ] = 0
∀` : Cov[zi` , ui ] = 0
IV3 means that the exogenous variables (exogenous regressors and ex-
cluded instruments) are uncorrelated with the error term.
IV5: Identifiability
(1, x̂i1 , ..., x̂iK , wi1 , ..., wiM ) are not linearly dependent
0 < V [x̂ik ] < ∞ and 0 < Vb [x̂ik ] for all k
0 < V [wim ] < ∞ and 0 < Vb [wim ] for all m
where x̂ik is predicted by a regression of xk on z1 , ..., zL , w1 , ..., wM
and a constant
IV5 is also called instrument relevance and requires that there are at
least as many excluded instruments as endogenous regressors, L ≥ K,
that all instruments (but the constant) have non-zero variance and not
too many extreme values, that the instruments are relevant predictors for
the endogenous regressors and that the predicted endogenous regressors
are not perfectly collinear, i.e. that different endogenous regressors are
differently predicted by the instruments.
5 Short Guides to Microeconometrics
The OLS estimators βk and γm are biased and inconsistent because OLS3
is violated.
(2) Regress y on x
b1 , ..., x
bK , w1 , ..., wM and a constant.
b0IV = ȳ − βb1IV x̄
γ
plim βbkIV = βk
[ βb1IV ] = P b2
σ
Avar[ N ¯b)2
xi − x
i=1 (b
with
N
1 X 2
b2 =
σ u
N i=1 i
b
where ubi = yi − (b
γ0 + βb1 xi1 ). In the general case with K endoge-
nous regressors, M exogenous regressors, L instruments and IV4b
(heteroscedasticity), Avar[βbIV ] can be consistently estimated as
k
the robust or Eicker-Huber-White estimator (see handout on “Het-
eroscedasticity in the linear Model”).
Note: The estimated asymptotic variance given in the usual output of the
2nd stage OLS regression is incorrect since σ b2 will be based on
bi = yi − (b
u γ0 + βb1 x
bi1 + ... + βbK x
biK + γ
b1 wi1 + ... + γ
bM wiM ) rather than
bi = yi − (b
u γ0 + β1 xi1 + ... + βK xiK + γ
b b b1 wi1 + ... + γ
bM wiM ).
7 Short Guides to Microeconometrics
all instruments are exogeneous assuming that a least one of the instru-
ments is exogenous. The J-Test will therefore not necessarily detect a
situation in which all instruments are endogenous.
yi = γ0 +β1 xi1 +...+βK xiK +γ1 wi1 +...+γM wiM +δ1 vbi1 +...+δK vbiK +ei
where vbi are the residuals from the first stage regressions for all endoge-
nous regressors (the variables xi1 , ..., xiK ). The exogeneity test is then
a joint F or Wald-Test that all K coefficients δ1 , ..., δK are equal to
zero. This test is robust to heteroscedasticity if the robust (Eicker-Huber-
White) variance estimator is used.
Note: This is a test for the exogeneity of the regressors xi and not for
the exogeneity of the instruments zi . If the instruments are not valid, the
test is not valid either.
Instrumental Variables 10
13 Heterogeneous Effects
Implementation in Stata 17
where varlist1 are exogeneous regressors (wi1 , ..., wiM ) , varlist2 are
endogenoues regressors (xi1 , ..., xiK ) and varlist3 are excluded instru-
ments (zi1 , ..., ziL ). For example, load data
webuse hsng2
and regress median monthly rents (rent) of census divisions on the share
of urban population (pcturban) and the median housing value (hsngval)
ivregress 2sls rent pcturban (hsngval = faminc reg2-reg4), vce(robust)
The test for exogeneity of the regressors can be calculated by adding the
first stage residuals to an auxiliary regression. For example,
regress hsngval pcturban faminc reg2-reg4
predict v, resid
regress rent hsngval pcturban v
test v
Implementation in R 4.2.3
and regress median monthly rents (rent) of census divisions on the share
of urban population (pcturban) and the median housing value (hsngval)
library(ivreg)
iv <- ivreg(rent~hsngval+pcturban|pcturban+faminc+reg2+reg3+reg4,
data = hsng2)
summary(iv)
References
Introductory textbooks
Advanced textbooks
Articles