This is my first post in Statalist. I am trying to use 2sls with a Dummy Interaction Term in unbalanced Panel Data with 183 groups and 10 years. Before going for 2sls, I ran the -xtreg, fe- command with my following equation, whereby Depvar is a continuous variable, Dummy_change is a dummy variable with value 0 (for before cahnge) and 1(for after change), Indepvar_1 is a dummy variable with value 0 (no) and 1 (yes), and Indepvar_2 is a continuous variable:
Code:
xtreg Depvar i.Dummy_change#(i.Indepvar_1 c.Indepvar_2) controlvars Dummy_change i.Year i.Industry, fe vce(cluster ID)
Code:
g dc_iv1 = Dummy_change#i.Indepvar_1
Code:
g dc_iv2 = Dummy_change#c.Indepvar_2
Code:
xtivreg Depvar (dc_iv1 dc_iv2 = i.Dummy_change#(i.L2.Indep_1 c.L2.Indep_2) controlvars Dummy_change i.Year i.Industry) controlvars Dummy_change i.Year i.Industry, fe
Could you please help me in this regard so as to get results for both 'before' and 'after' change with a single equation? I am using Stata 12.1 special edition and installed xtivreg into it.
0 Response to Interaction Terms in 2sls
Post a Comment