Dear All,
I am looking to the impact of migration on sales.
Suppose we have two cities, one receives the migration and the other does not. In this case, in a simple Difference in difference framework we have the following set up
1) A dummy variable "treatment", taking 1 in the treatment area, 0 in the control area
2) Another dummy variable T, taking 1 in the post-immigration period, 0 in the pre-immigration period.
gen posttreat=T* treatment
reg sale T treatment posttreat
Suppose we have the following case: Two cities receive the migration at the same time and at different levels.
Let migration level be R and it's a continuous variable and is equal to 0 before the immigration.
I have seen the following specification in several papers to deal with this type of situation and it has been called as DID as well.
but I don't understand why we call this specification as DID as we do not have a treatment region? All the cities are in fact treated.
reg sale R i.year i.Ilkodu
Thnak you very much
CODE]
* Example generated by -dataex-. To install: ssc install dataex
clear
input byte(Ilkodu2 Ilkodu3 year7 year8 Ilkodu) float year str2 nacerev2 double sale float(T treatment posttreat) long R byte _merge str4 id2
1 0 1 0 2 2007 "17" 56136182 0 1 0 0 1 "4120"
1 0 1 0 2 2007 "17" 20159743 0 1 0 0 1 "9920"
1 0 1 0 2 2007 "26" 132658913 0 1 0 0 1 "2570"
1 0 1 0 2 2007 "17" 41305939 0 1 0 0 1 "1670"
0 1 1 0 3 2007 "15" 1996028 0 0 0 0 1 "1700"
0 1 1 0 3 2007 "15" 21337287 0 0 0 0 1 "8430"
0 1 1 0 3 2007 "26" 3117482 0 0 0 0 1 "8860"
0 1 1 0 3 2007 "28" 19449433 0 0 0 0 1 "1050"
0 1 1 0 3 2007 "26" 16597899 0 0 0 0 1 "7340"
0 1 1 0 3 2007 "15" 12961767 0 0 0 0 1 "7320"
0 1 1 0 3 2007 "26" 31249389 0 0 0 0 1 "2860"
0 1 1 0 3 2007 "17" 30070154 0 0 0 0 1 "7340"
0 1 1 0 3 2007 "15" 1870829 0 0 0 0 1 "5660"
0 1 1 0 3 2007 "26" 7615988 0 0 0 0 1 "3940"
0 1 1 0 3 2007 "26" 2539310 0 0 0 0 1 "8006"
0 1 1 0 3 2007 "25" 46998310 0 0 0 0 1 "2190"
0 1 1 0 3 2007 "15" 4983883 0 0 0 0 1 "8006"
0 1 1 0 3 2007 "15" 700796 0 0 0 0 1 "1690"
0 1 1 0 3 2007 "19" 10222068 0 0 0 0 1 "7200"
0 1 1 0 3 2007 "25" 38729079 0 0 0 0 1 "6890"
0 1 1 0 3 2007 "29" 2314273 0 0 0 0 1 "3990"
0 1 1 0 3 2007 "26" 51705929 0 0 0 0 1 "8006"
0 1 1 0 3 2007 "17" 2271669 0 0 0 0 1 "6890"
0 1 1 0 3 2007 "19" 903104 0 0 0 0 1 "3850"
0 1 1 0 3 2007 "26" 11421435 0 0 0 0 1 "6110"
0 1 1 0 3 2007 "20" 2491410 0 0 0 0 1 "3870"
0 1 1 0 3 2007 "15" 27149987 0 0 0 0 1 "2540"
0 1 1 0 3 2007 "26" 1719715 0 0 0 0 1 "5890"
0 1 1 0 3 2007 "15" 13319454 0 0 0 0 1 "5150"
0 1 1 0 3 2007 "15" 3315793 0 0 0 0 1 "5910"
1 0 0 1 2 2008 "17" 23827191 1 1 1 10193 3 "9920"
1 0 0 1 2 2008 "17" 79671546 1 1 1 10193 3 "4120"
0 1 0 1 3 2008 "15" 6177301 1 0 0 69 3 "8006"
0 1 0 1 3 2008 "15" 119583559 1 0 0 69 3 "6480"
0 1 0 1 3 2008 "17" 1030 1 0 0 69 3 "6890"
0 1 0 1 3 2008 "28" 20117819 1 0 0 69 3 "1050"
0 1 0 1 3 2008 "15" 11060105 1 0 0 69 3 "7320"
0 1 0 1 3 2008 "19" 8877751 1 0 0 69 3 "7200"
0 1 0 1 3 2008 "15" 2449982 1 0 0 69 3 "5910"
0 1 0 1 3 2008 "26" 1957573 1 0 0 69 3 "8860"
0 1 0 1 3 2008 "17" 33833147 1 0 0 69 3 "7340"
0 1 0 1 3 2008 "26" 9167643 1 0 0 69 3 "3940"
0 1 0 1 3 2008 "20" 2260912 1 0 0 69 3 "3870"
0 1 0 1 3 2008 "25" 62691116 1 0 0 69 3 "2190"
0 1 0 1 3 2008 "26" 11826668 1 0 0 69 3 "7340"
0 1 0 1 3 2008 "25" 44062933 1 0 0 69 3 "6890"
0 1 0 1 3 2008 "15" 15536338 1 0 0 69 3 "5150"
0 1 0 1 3 2008 "26" 41849696 1 0 0 69 3 "8006"
0 1 0 1 3 2008 "26" 5041961 1 0 0 69 3 "5890"
0 1 0 1 3 2008 "15" 26775613 1 0 0 69 3 "8430"
0 1 0 1 3 2008 "19" 852012 1 0 0 69 3 "3850"
0 1 0 1 3 2008 "15" 32051224 1 0 0 69 3 "2540"
0 1 0 1 3 2008 "26" 2600697 1 0 0 69 3 "8006"
0 1 0 1 3 2008 "26" 39992569 1 0 0 69 3 "2860"
end
[/CODE]
------------------ copy up to and including the previous line ------------------
Related Posts with Migration analysis using "Difference in difference "
Coefficient interpretation from a GLM regression family(gamma) link(log)Hi all, I am trying to explain some coefficients from a GLM regression with family(gamma) link(log)…
Hypothesis Testing Regression Coefficients: One-sidedHelpful Link: https://www.stata.com/support/faqs/statistics/one-sided-tests-for-coefficients/ Hell…
OutliersDear All, I have a quick question, Is it necessary to remove outliers from survey data? Would that…
Combining two panel databasesDear Stata team, I was wondering if anyone could help me with the following: I have a panel databas…
Missing variables using reshape wide commandHi, This is the command I'm using- reshape wide day_piece, i(farm) j(day_sales) string And this is…
Subscribe to:
Post Comments (Atom)
0 Response to Migration analysis using "Difference in difference "
Post a Comment