Dear Users,
I want to run a Diff N Diff regression, to try to understand if my y var has been affected by the entrance in the European Union. My dataset is a panel of 40 countries in 15 years, and looks like that:
country year y id ue due d04 did04
Albania 2000 53.6 1 0 0 0 0 0
Albania 2001 56.6 1 0 0 0 0 0
Albania 2002 56.8 1 0 0 0 0 0
Albania 2003 56.8 1 0 0 0 0 0
In generate both the dummy for the time and the one for the treatment with:
generate due=0
replace due=1 if ue<=year
gen d04 = (year>=2004) & !missing(year)
because my "treatment" is the entrance in the European Union. I generated an interaction variable with:
generate did04=d04*due
When I try to perform the diff n diff, writing
regress y d04 due did04, robust
Stata omitted because of multicollineary the interaction term, reporting this error:
note: did04 omitted because of collinearity
I use Stata 13.1. Where is my error? Thank you in advance for any help, and excuse me for any unintentional mistake I did expressing the problem.
I want to run a Diff N Diff regression, to try to understand if my y var has been affected by the entrance in the European Union. My dataset is a panel of 40 countries in 15 years, and looks like that:
country year y id ue due d04 did04
Albania 2000 53.6 1 0 0 0 0 0
Albania 2001 56.6 1 0 0 0 0 0
Albania 2002 56.8 1 0 0 0 0 0
Albania 2003 56.8 1 0 0 0 0 0
In generate both the dummy for the time and the one for the treatment with:
generate due=0
replace due=1 if ue<=year
gen d04 = (year>=2004) & !missing(year)
because my "treatment" is the entrance in the European Union. I generated an interaction variable with:
generate did04=d04*due
When I try to perform the diff n diff, writing
regress y d04 due did04, robust
Stata omitted because of multicollineary the interaction term, reporting this error:
note: did04 omitted because of collinearity
I use Stata 13.1. Where is my error? Thank you in advance for any help, and excuse me for any unintentional mistake I did expressing the problem.
Comment