On "1. electoral.do" I generated a new variable called winning_margin2 that uses the mg margin variable of Magar. I fill the missing with my own estimates of winning margin. There is a 0.98 correlation but there are differences. This may change results.
On "1. electoral.do" I did a better cleaning on which duplicates to drop.
On "1. electoral.do" I corrected the reform dummy. In Oaxaca, only a third (around 149 to 152) municipalities have elections. The rest are governed by usos y costumbres. So variable reform only applies to these ones. We live them as missing. Also, there where missing values in the reform dummy for the never treated (Veracruz and Hidalgo), and missings for elections for those that triggered the reform in the fifth year of treatment.
what this means for the treatment is that I was really never comparing estimates to the never treated but only to the yet to be treated. This is a big change.
Oaxaca has many municipalities without elections. This could be used as placebo test later.
right now I have the dataset built for all years but I could limit it for the years where there are elections. Think about this when running estimates. If I want to isolate then I would need to change the way in which I am constructing the dataset, specifically the leads and lags. This might be good for main estimates but for testing transfers and things that are yearly it will be better to do it as a I have it right now.
1.1. what I should do is to is for the electoral timelines, use t as a reference for election, or use e-1, e-2, etc.
In line 413 of 2.database.do I erase all years in which I don't have elections. This might be good for the incumbency advantage measures but not for transfers estimates.
Important comments on data: