Dear Statalists,
I am trying to implement difference-to-difference estimation as a regression controlling for age and sex.
My dependent variable is unemp (unemployment), there are 5 cities (Berlin, Munich, Hamburg, Cologne and Frankfurt) and 15 years (2000~2015).
I want to run the regression for European only.
The story of this data-set is to see the effect of immigration influx into Berlin in 2010 on unemployment using the DD model.
The effects of the influx would only be seen from 2011 onwards.
Can you check if my command and regression model (with explanation) are appropriate please?
The following is the regression model with an explanation I wrote.
Ycjt = ðūc + ðt + ÎīDct + ðcjtð― + ðcjt
c is cities, t is years, j is gender and age.
Y is unemployment
ðūc is a dummy for each city
ðt is a dummy for each year
ðcjt includes dummies for age and gender.
Dct, is regressor of interest which indicates observations for people in Berlin from 2011 onwards (after the immigration inflow)
The following is my code.
keep if race=="European"
gen Treat=0
replace Treat=1 if city=="Berlin"
gen Post=0
replace Post=1 if year>=2011
gen TreatPost=Treat*Post
xi: reg unemp i.city i.year TreatPost sex age, cluster(city)
I am trying to implement difference-to-difference estimation as a regression controlling for age and sex.
My dependent variable is unemp (unemployment), there are 5 cities (Berlin, Munich, Hamburg, Cologne and Frankfurt) and 15 years (2000~2015).
I want to run the regression for European only.
The story of this data-set is to see the effect of immigration influx into Berlin in 2010 on unemployment using the DD model.
The effects of the influx would only be seen from 2011 onwards.
Can you check if my command and regression model (with explanation) are appropriate please?
The following is the regression model with an explanation I wrote.
Ycjt = ðūc + ðt + ÎīDct + ðcjtð― + ðcjt
c is cities, t is years, j is gender and age.
Y is unemployment
ðūc is a dummy for each city
ðt is a dummy for each year
ðcjt includes dummies for age and gender.
Dct, is regressor of interest which indicates observations for people in Berlin from 2011 onwards (after the immigration inflow)
The following is my code.
keep if race=="European"
gen Treat=0
replace Treat=1 if city=="Berlin"
gen Post=0
replace Post=1 if year>=2011
gen TreatPost=Treat*Post
xi: reg unemp i.city i.year TreatPost sex age, cluster(city)
Comment