Dear all,
I am currently running a regression in Stata that involves an interaction term between years and countries (this is a simplified regression because I am training myself in interaction terms). What I would like to do is set the base group of 2 variables for this regression, namely country and year. I want Base country=USA, and Base year= 2011. The code that I use to do this looks as follows:
Code:
fvset base 88 country // set USA as base country, country dummy observation that is dropped
fvset base 2011 year // set 2011 as base year
reg logp i.country#i.year, baselevels
When I run the regression however, it seems that the code only works for the case where year=2011. In every other year, the base country is not USA anymore. I test this by running the regression without the year interaction for specific years to confirm this. I confirm that in these cases another country is chosen as the base country. Therefore, my question is the following. Would anyone have a clue why my regression is not setting USA as base country for years other than 2011? I presume I have an error in my code, but I cannot find it. Any help would be greatly appreciated.
Best,
Satya
0 Response to Set base group for 2 variables when including interaction terms in a regression
Post a Comment