*! Sep2021

help ivolsdec

Title

ivolsdec -- Decomposition of the IV-OLS coefficient gap

Syntax

ivolsdec outcome
(treatment=instruments) covariates [weight] [if exp]
[, xnbasis(varlist)
wbasis(varlist)
xibasis(varlist)
vce(vcetype)
did
rdd
binary
tlevel(numlist)
cgroup(varlist)
format(fmt)]

aweights, fweights, iweights and pweights are allowed; see help weights.

Factor variables are allowed in instruments, covariates, xnbasis, wbasis, xibasis, and cgroup.

Description

ivolsdec performs a decomposition of the IV-OLS coefficient gap suggested by Ishimaru (2021). This decomposition accounts for nonlinearity and observed heterogeneity in a relation between the outcome variable and the treatment variable, generalizing the one suggested by Lochner and Moretti (2015).

In the language of causal inference, outcome is an outcome variable (Y),
treatment is a treatment variable (X), instruments is a set of instruments (Z),
and covariates is a set of covariates (W).
The decomposition allows for the possibility that the true causal impact of X on Y is nonlinear in X and heterogeneous across W,
and assesses how the IV-OLS gap is influenced by the way in which IV and OLS estimates put weights on X and W. In particular, the IV-OLS gap is decomposed into the following three components.

(1) Covariate weight difference: the difference in how the IV and OLS coefficients place weights on the covariates W.

(2) Treatment-level weight difference: the difference in how they place weights on treatment levels X.

(3) Marginal effect difference: the difference between the IV- and OLS-identified marginal effects, which usually originates from endogeneity bias.

See Ishimaru (2021) for complete details about the underlying theoretical framework.

In computing the decomposition, this command performs the following two auxiliary OLS regressions:

Y = W'a1 + (q(W)'b1)*X + e1, and

Y = W'a2 + (q(W)'b2)*X + q(W)'(C2)r(X) + p(X)'d2 + e2,

where q(W) is a set of basis functions of W specified by wbasis (the default is q(W)=W),
r(X) is a set of basis functions of X specified by xibasis (the default is r(X)=0),
and p(X) is a set of basis functions of X specified by xnbasis (must be chosen by the user).
In principle, q(W)'b1 in the first equation above should approximate a covariate-specific OLS coefficient b_OLS(W)=Cov(Y,X|W)/Var(X|W) well and the second equation as a whole should approximate E[Y|X,W] well. For practical convenience, this command uses simple series approximiations specified above. Users who want to work with a more flexible specification may refer to Section 4 of Ishimaru (2021) to implement the decomposition on their own.

If neither did nor rdd option is active, the decomposition assumes that both E[X|W] and E[Z|W] are (approximately) linear in W, so that the original OLS and IV coefficients do not have omitted variable bias associated with unaccounted nonlinear effects of covariates. This linearity requirement is satisfied automatically if a vector W consists of indicators for disjoint groups. However, the choice of a covariate vector W requires caution in general. In the presence of continuous covariates, for example, it is desirable that a vector W flexibly accounts for nonlinear and interaction effects of these variables.

Options

xnbasis specifies the basis functions of X not interacted with wbasis. This option is required unless the option binary is active.

wbasis specifies the basis functions of W that are interacted with X and xibasis. If not specified, variables in covariates are used.

xibasis specifies the basis functions of X that are interacted with wbasis.

vce specifies the type of standard errors reported. The default is robust. vcetype admits standard options in regress and ivregress commands, such as (cluster clustvar).

did indicates that the original IV regression uses difference-in-differences variation in the instruments for identification; see Section 3 of Ishimaru (2021).

rdd indicates that the original IV regression implements (fuzzy) regression discontinuity designs; see Section 3 of Ishimaru (2021).

binary must be specified when treatment is a binary variable. The treatment-level weight difference is zero by construction in such a setting.

tlevel designates treatment levels. The OLS and IV weights on the degignated treatment levels will be displayed. In Ishimaru (2021), Figure 1 displays an empirical example and Appendix D.4 describes how to estimate the weights.

cgroup designates covariate groups. The variables in varlist must be binary and be generated from covariates. The OLS and IV weights on the designated covariate groups will be displayed. In Ishimaru (2021), Tables 2-4 present empirical examples and Appendix D.4 describes how to estimate the weights.

format specifies numerical display formats of the results; see help format.

Example

Load Card (1995) data

. use http://www.stata.com/data/jwooldridge/eacsap/card, clear

Run OLS and IV regressions as usual (ivolsdec works even without running these commands beforehand)

. regress lwage educ age black smsa66 south66 sinmom14 kww, robust

. ivregress 2sls lwage (educ=nearc4) age black smsa66 south66 sinmom14 kww, robust

Run ivolsdec command to decompose the IV-OLS gap

. ivolsdec lwage (educ=nearc4) age black smsa66 south66 sinmom14 kww, xnb(i.educ) format(%7.3f)

May try a different specification

. gen educ_c=max(educ-12,0)

. ivolsdec lwage (educ=nearc4) age black smsa66 south66 sinmom14 kww, xnb(i.educ) xib(educ_c) format(%7.3f)

Display weights on covariate groups and treatment levels in addition to the decomposition

. xtile kww_g=kww, nq(3)

. ivolsdec lwage (educ=nearc4) age black smsa66 south66 sinmom14 kww, xnb(i.educ) tlevel(9/18) cgroup(ibn.south66 sinmom14 ibn.kww_g) format(%7.3f)

Stored results

ivolsdec stores r(D), which is a matrix that contains the estimates (Column 1) and the standard errors (Column 2) of:

(Row 1) OLS coefficient of X,

(Row 2) IV (TSLS) coefficient,

(Row 3) IV-OLS gap,

(Row 4) covariate weight difference,

(Row 5) treatment-level weight difference, and

(Row 6) Marginal effect difference.

Note: Standard errors of OLS and IV estimates are directly taken from regress and ivregress commands.
Standard errors of decomposition estimators are computed by regress, using the asymptotic formula provided in Section 4 of Ishimaru (2021).

A matrix r(LW) will be stored when the option tlevel is specified. Each row of the matrix corresponds to a treatment level designated by tlevel. The matrix has four columns:

(Column 1) OLS weights on the treatment levels,

(Column 2) Standard errors of the OLS weights,

(Column 3) IV weights on the treatment levels, and

(Column 4) Standard errors of the IV weights.

A matrix r(CW) will be stored when the option cgroup is specified. Each row of the matrix corresponds to a covariate group designated by cgroup. The matrix has five columns:

(Column 1) Shares of the groups in the data,

(Column 2) OLS weights on the groups,

(Column 3) Standard errors of the OLS weights,

(Column 4) IV weights on the groups, and

(Column 5) Standard errors of the IV weights.

References

Lochner, L. and Moretti, E., 2015. Estimating and Testing Models with Many Treatment Levels and Limited Instruments. The Review of Economics and Statistics, 97(2), pp.387-397.

Ishimaru, S., 2021. Empirical Decomposition of the IV-OLS gap with Heterogeneous and Nonlinear Effects. arXiv:2101.04346.

Author

Shoya Ishimaru

Hitotsubashi University

Tokyo, Japan

shoya.ishimaru@r.hit-u.ac.jp

Also see

Help: locmtest
(if installed)