help for ivreg2hdfe ()

Title

ivreg2hdfe - Estimates an Instrumental Variable Linear Regression Model with two High Dimensional Fixed Effects.

Syntax

ivreg2hdfe [if], DEpvar(depvar) ENdog(varlist) iv(varlist) [EXog(varlist)] id1(varname) id2(varname) [cluster(varname)] [gmm2s]

Description

This command builds on the command reg2hdfe and ivreg2 for estimation
of a linear instrumental variables regression model with two high dimensional fixed effects.
The command is particulary useful when an instrumental variable approach is required in particularly
large datasets, because it removes the high dimensional fixed effects from the data in the first step.
Then it runs the IV model with the transformed variables after the proper demeaning.

ivreg2hdfe requires reg2hdfe, ivreg2 and tmpdir; which can be installed from ssc by typing in the command prompt:
. ssc install reg2hdfe
. ssc install ivreg2
. ssc install tmpdir

Syntax

DEpvar(depvar): Dependent Variable

ENdog(varlist): List of endogenous variables (to be instrumented)

iv(varlist): List of Instrumental Variables (number of IVs should be at least the
number of endogenous variables)

id1(varname) id2(varname): Identification of the two high dimensional fixed effects variables

Options

EXog(varlist): List of other exogenous variables

cluster(varname): One-way or two-way clustered standard errors

gmm2s: Use the Generalized Methods of Moments to estimate the IV regression

Examples

Estimates a model with two high dimensional fixed effects

. ivreg2hdfe if temp_ext, depvar(newproductRCA_d) en(lnmigrants_M_o lnmigrants_rev_M_o) ex(lnexp_d growthexp_d_lagged expzero_d_lagged) iv(comlang2_B_M_o comlang2_B_rev_M_o) id1(countryid) id2(productyearid) cluster(countryid) gmm2s

Author

Dany Bahar, Harvard University

Email: dbaharc@gmail.com

Comments welcome!

Acknowledgements

This program makes use of reg2hdfe and ivreg2 commands.

Also see

reg2hdfe (if installed), ivreg2 (if installed)