I am currently doing research on the effect of water use restrictions on residential water use, using a Difference in Differences approach.
I have monthly water use data for 13 counties for 23 years, but with gaps and the data set is also unbalanced.
My dependent variable is Per capita water use (continuous in gallons per month), my main independent variables are Phase_1 (a certain type of water restriction), which is a dummy variable (0=this restriction not implemented, 1=this restriction implemented), treatment2007 is also a dummy variable (0= for all months from 1985 to 2006, 1= for all months from 2007 to 2012) and the respective interaction_1. Additional variables are Median household income (continuous in absolute values) and Bachelor' (also continuous in %).
I used xtreg in Stata 15.1. with fixed-effects, running basically the same regression three times because I have three differently strict restrictions (Phase_1, Phase_2, Phase_3) whose effect I want to see separately.
I had difficulties interpreting the results for the effect of the respective interaction terms, and I read on Statalist that it is easier to use factor variables because results are displayed in a nicer way. Therefore, I used xtreg with fixed-effects with factor variables (Phase_1#Treatment2007). And the results I received slightly differ from the xtreg fixed-effects with my defined interaction variables.
Most of the variables receive the same coefficient and the same significance, however, the coefficient for the interaction_1 changes and it becomes suddenly significant. I wonder why?
-----------------------
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(percapwateruse Phase_1 treatment_2007 interaction_1 medianhouseholdincome bachelor) 5528.2 0 0 0 24974.6 16.95 5283.9 0 0 0 24974.6 16.95 5683.2 0 0 0 24974.6 16.95 5207.7 0 0 0 24974.6 16.95 5450 0 0 0 24974.6 16.95 5270.1 0 0 0 24974.6 16.95 4782 0 0 0 24974.6 16.95 5077.3 0 0 0 24974.6 16.95 4611.2 0 0 0 24974.6 16.95 5047.3 0 0 0 24974.6 16.95 5008.9 0 0 0 24974.6 16.95 5036 0 0 0 24974.6 16.95 5019.8 0 0 0 26373.7 17.32 4912.3 0 0 0 26373.7 17.32 5207.7 0 0 0 26373.7 17.32 5688.4 0 0 0 26373.7 17.32 5763.8 0 0 0 26373.7 17.32 5284.1 0 0 0 26373.7 17.32 5252.3 0 0 0 26373.7 17.32 5336.1 0 0 0 26373.7 17.32 5418.1 0 0 0 26373.7 17.32 5652.3 0 0 0 26373.7 17.32 5114.8 0 0 0 26373.7 17.32 5255 0 0 0 26373.7 17.32 5183.5 0 0 0 27772.8 17.69 4743.6 0 0 0 27772.8 17.69 5318.6 0 0 0 27772.8 17.69 5639.5 0 0 0 27772.8 17.69 5731.6 0 0 0 27772.8 17.69 5680.3 0 0 0 27772.8 17.69 5650.1 0 0 0 27772.8 17.69 6148.4 0 0 0 27772.8 17.69 5344.7 0 0 0 27772.8 17.69 5490.1 0 0 0 27772.8 17.69 5190.8 0 0 0 27772.8 17.69 5529.2 0 0 0 27772.8 17.69 5366.6 0 0 0 29171.9 18.06 5254.9 0 0 0 29171.9 18.06 5881.7 0 0 0 29171.9 18.06 6280.8 0 0 0 29171.9 18.06 5872.1 0 0 0 29171.9 18.06 5109.8 0 0 0 29171.9 18.06 5224.3 0 0 0 29171.9 18.06 5380.5 0 0 0 29171.9 18.06 5503.4 0 0 0 29171.9 18.06 6045.4 0 0 0 29171.9 18.06 5422.3 0 0 0 29171.9 18.06 5832.7 0 0 0 29171.9 18.06 5785.9 0 0 0 30571 18.43 5477.5 0 0 0 30571 18.43 5714.8 0 0 0 30571 18.43 5668.1 0 0 0 30571 18.43 5740.2 0 0 0 30571 18.43 5421.9 0 0 0 30571 18.43 5231.4 0 0 0 30571 18.43 5467.9 0 0 0 30571 18.43 5329.1 0 0 0 30571 18.43 5375.9 0 0 0 30571 18.43 4524.6 0 0 0 31683 18.8 4638.3 0 0 0 31683 18.8 4888.9 0 0 0 31683 18.8 4825.8 0 0 0 31683 18.8 4975.6 0 0 0 31683 18.8 5317.1 0 0 0 31683 18.8 5448.4 0 0 0 31683 18.8 5185.1 0 0 0 32795 19.37 4883.6 0 0 0 32795 19.37 5472.5 0 0 0 32795 19.37 5143.2 0 0 0 32795 19.37 5559.5 0 0 0 32795 19.37 4881.3 0 0 0 32795 19.37 5077.8 0 0 0 32795 19.37 5425.6 0 0 0 32795 19.37 4880.2 0 0 0 32795 19.37 4917.7 0 0 0 32795 19.37 5088.8 0 0 0 32795 19.37 5478.6 0 0 0 32795 19.37 5450.3 0 0 0 33907 19.94 5034.5 0 0 0 33907 19.94 5424.3 0 0 0 33907 19.94 5033 0 0 0 33907 19.94 6009.6 0 0 0 33907 19.94 4877.9 0 0 0 33907 19.94 5425 0 0 0 33907 19.94 5301.3 0 0 0 33907 19.94 4951.4 0 0 0 33907 19.94 5528.2 0 0 0 33907 19.94 5082.7 0 0 0 33907 19.94 5511.1 0 0 0 33907 19.94 5081.3 0 0 0 35019 20.51 4777.8 0 0 0 35019 20.51 5343.7 0 0 0 35019 20.51 5247.7 0 0 0 35019 20.51 6228.5 0 0 0 35019 20.51 5434.1 0 0 0 35019 20.51 5361 0 0 0 35019 20.51 5346.9 0 0 0 35019 20.51 4994 0 0 0 35019 20.51 5008.1 0 0 0 35019 20.51 5218.4 0 0 0 35019 20.51 end
I hope I considered all the rules and explained everything necessary and this is how the dataex output is supposed to be displayed.
Thank you in advance for your time.
Lara
0 Response to Different output after using xtreg, fe using factor variables instead of
Post a Comment