Dear Stata community,
I'd like to run an IV regression with interaction terms between the endogenous variable and two other variables to study heterogeneous treatment effects, suppose x1 is the endogenous variable, z is the instrument, x2 and x3 are the two variables to be interacted with x1; x1_x2, x1_x3, z_x2 z_x3 are interactions between x1 and x2, x1 and x3, z and x2, and z and x3, respectively, I'd also like to use ivreghdfe to control for fixed effects. I was wondering if the following code is correct:
ivreghdfe y (x1 x1_x2 x1_x3 = z z_x2 z_x3) x2 x3, a(fe1)
More specifically, I'd like to ask is it right to write the code for instrumenting as (x1 x1_x2 x1_x3 = z z_x2 z_x3)?
Thanks,
Yi
Related Posts with IV regressions with interaction terms
Intended Nickell bias to test the usefullness of different fixed effectsHi all, I am working on panel data and I assume that at least one of my explanatory variables is en…
Find the the variable with highest value and mark this as 1, while the other variables are marked 0Hello all, I have a data set that looks like this: Code: input int year float(A B C D E) 1950 .3…
Generate new variable(s) conditional on different variables taking a specific valueDears, I would generate new variables every time that corr_tof* takes the same value as tof. Here b…
Difference between variables doesn't workHello everybody, I've been using this forum for reading very useful tips, for which I am really gre…
margins for mvregHi, I did a mvreg on 2 continuous outcomes variables y1 y2 with 3 continuous predictors x1 x2 x3*x4…
Subscribe to:
Post Comments (Atom)
0 Response to IV regressions with interaction terms
Post a Comment