Dear all I have a question about including interaction terms in a regression model.
I am using panel data at the intra household level. The data is collected for three rounds so time period is 3 and the panels are the individuals within the household. I want to see the impact of droughts, floods and price on individual food consumption.
Dependent variable = Consumption
Time variable=Round
Panel Variable = Individual within House_no
Explanatory variables = Literacy Drought Flood and Price
I have an additional variable "member" that identifies different family members namely boys, gorls, men, women, elderly men and elderly women.
For this I run a regression where the dependent variable is food consumption of individuals. As explanatory variables I include Literacy, Price and dummy variables for Droughts and Floods. Food consumption, and literacy vary across individuals however the dummies for Droughts, Flood and Price vary at the household level (not at the individual level).
Since I want to see the impact of Droughts, Flood and Price on intra household consumption I want to include them only as interactions with the member variables. I try the below specification.
egen group= group(House_no Individual), label
xtset group Round
xtreg Consumption Literacy i.Drought#i.member i.Flood#i.member c.Price#i.member i.Round , fe
[/CODE]
I expect the interaction terms to give me results for the member variable when Droughts and Floods take the value 1. However the results are confusing as i get the estimates even when the dummy variables are equal to 0.
Any advice would be appreciated as to what i am doing wrong
I am using panel data at the intra household level. The data is collected for three rounds so time period is 3 and the panels are the individuals within the household. I want to see the impact of droughts, floods and price on individual food consumption.
Dependent variable = Consumption
Time variable=Round
Panel Variable = Individual within House_no
Explanatory variables = Literacy Drought Flood and Price
I have an additional variable "member" that identifies different family members namely boys, gorls, men, women, elderly men and elderly women.
For this I run a regression where the dependent variable is food consumption of individuals. As explanatory variables I include Literacy, Price and dummy variables for Droughts and Floods. Food consumption, and literacy vary across individuals however the dummies for Droughts, Flood and Price vary at the household level (not at the individual level).
Since I want to see the impact of Droughts, Flood and Price on intra household consumption I want to include them only as interactions with the member variables. I try the below specification.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double(House_no Individual) float(Literacy member Round Consumption) double(Drought Flood) float Price 1 1 0 1 1 4.0661736 1 0 5.467961 1 2 0 2 1 3.4420195 1 0 5.467961 1 3 0 1 1 3.8694634 1 0 5.467961 1 4 0 1 1 4.101265 1 0 5.467961 2 1 0 1 1 2.995732 0 1 4.4532146 2 2 0 2 1 2.995732 0 1 4.4532146 2 3 0 1 1 2.995732 0 1 4.4532146 3 1 0 1 1 2.995732 0 0 5.170106 3 2 0 2 1 3.7297015 0 0 5.170106 3 3 0 1 1 4.4228487 0 0 5.170106 3 4 0 2 1 2.995732 0 0 5.170106 4 1 0 1 1 4.2158246 0 0 4.5442963 4 2 0 1 1 4.002031 0 0 4.5442963 4 3 0 1 1 4.394449 0 0 4.5442963 4 4 0 6 1 4.2158246 0 0 4.5442963 5 1 0 1 1 5.622105 0 1 5.041504 5 2 0 2 1 5.139253 0 1 5.041504 5 3 0 2 1 5.485529 0 1 5.041504 5 4 0 3 1 5.485529 0 1 5.041504 6 1 0 1 1 5.198234 0 0 4.4584827 6 3 0 3 1 4.910552 0 0 4.4584827 6 4 0 3 1 4.505087 0 0 4.4584827 7 1 0 1 1 5.039147 0 0 4.251332 8 1 0 5 1 4.0964584 0 0 4.1943393 8 2 0 2 1 4.473143 0 0 4.1943393 8 3 0 4 1 4.0008264 0 0 4.1943393 8 4 0 2 1 3.5943055 0 0 4.1943393 9 1 0 1 1 4.7285824 0 1 4.5547814 9 2 0 2 1 4.437426 0 1 4.5547814 9 3 0 4 1 4.437426 0 1 4.5547814 9 4 0 3 1 4.3150067 0 1 4.5547814 9 5 1 6 1 4.394189 0 1 4.5547814 1 1 0 1 2 5.115996 0 0 5.467961 1 2 0 2 2 5.115996 0 0 5.467961 1 3 0 3 2 5.039147 0 0 5.467961 1 4 0 1 2 5.115996 0 0 5.467961 2 1 0 1 2 4.1967425 0 0 5.045644 2 2 0 2 2 4.1967425 0 0 5.045644 2 3 0 1 2 4.215394 0 0 5.045644 3 1 0 1 2 4.185422 0 0 5.026363 3 2 0 2 2 4.156924 0 0 5.026363 3 3 0 1 2 2.995732 0 0 5.026363 4 1 0 1 2 4.3780656 0 1 5.226694 4 2 0 1 2 4.3780656 0 1 5.226694 4 3 0 3 2 5.039147 0 1 5.226694 4 4 0 6 2 4.387086 0 1 5.226694 4 5 1 2 2 4.3848567 0 1 5.226694 5 1 0 1 2 4.0554314 0 0 5.585279 5 2 0 2 2 3.9633164 0 0 5.585279 5 3 0 2 2 3.9763885 0 0 5.585279 5 4 0 1 2 4.002031 0 0 5.585279 6 1 0 1 2 5.034825 1 1 4.7509837 6 2 0 2 2 4.857273 1 1 4.7509837 6 3 0 3 2 5.039147 1 1 4.7509837 6 4 0 3 2 4.857273 1 1 4.7509837 6 6 1 3 2 4.857273 1 1 4.7509837 7 1 0 1 2 4.59522 0 0 5.191849 7 2 0 2 2 4.59522 0 0 5.191849 7 4 0 1 2 3.902073 0 0 5.191849 8 1 0 5 2 4.473143 0 0 5.517803 8 2 0 2 2 4.0008264 0 0 5.517803 8 3 0 4 2 3.499627 0 0 5.517803 8 4 0 2 2 3.5943055 0 0 5.517803 9 5 1 1 2 4.473143 0 0 4.6879663 1 1 0 5 3 5.039147 0 0 4.888159 1 2 0 2 3 4.791809 0 0 4.888159 1 3 0 4 3 5.039147 0 0 4.888159 1 4 0 1 3 4.985965 0 0 4.888159 2 1 0 1 3 4.824568 1 0 4.783557 2 2 0 2 3 4.710537 1 0 4.783557 2 3 0 1 3 4.53605 1 0 4.783557 2 4 0 3 3 4.2909274 1 0 4.783557 3 1 0 1 3 4.104698 1 1 5.346228 3 2 0 2 3 4.014138 1 1 5.346228 3 3 0 5 3 4.002031 1 1 5.346228 3 4 0 6 3 4.394449 1 1 5.346228 4 1 0 1 3 4.67418 1 0 4.550129 4 2 0 1 3 4.632998 1 0 4.550129 4 3 0 1 3 4.696973 1 0 4.550129 4 4 0 4 3 5.039147 1 0 4.550129 4 5 1 2 3 4.505028 1 0 4.550129 5 1 0 5 3 4.465908 0 0 4.947703 5 2 0 2 3 4.394449 0 0 4.947703 5 3 0 2 3 4.2801323 0 0 4.947703 5 4 0 1 3 4.2158246 0 0 4.947703 6 1 0 1 3 4.004663 0 1 4.780981 6 2 0 2 3 4.2336717 0 1 4.780981 6 3 0 1 3 5.039147 0 1 4.780981 6 4 0 3 3 3.764837 0 1 4.780981 6 5 1 3 3 3.461456 0 1 4.780981 6 6 1 3 3 3.764837 0 1 4.780981 7 1 0 1 3 4.739899 1 1 4.861855 7 2 0 2 3 4.59027 1 1 4.861855 7 3 0 3 3 4.565402 1 1 4.861855 7 4 0 5 3 4.473143 1 1 4.861855 7 6 1 5 3 4.706102 1 1 4.861855 8 1 0 5 3 4.0732913 1 0 5.079934 8 2 0 2 3 4.049575 1 0 5.079934 8 3 0 2 3 4.0964584 1 0 5.079934 8 4 0 2 3 4.0732913 1 0 5.079934 end
xtset group Round
xtreg Consumption Literacy i.Drought#i.member i.Flood#i.member c.Price#i.member i.Round , fe
[/CODE]
I expect the interaction terms to give me results for the member variable when Droughts and Floods take the value 1. However the results are confusing as i get the estimates even when the dummy variables are equal to 0.
Any advice would be appreciated as to what i am doing wrong

Comment