I have a dataset with yearly levels of corruption in a number of countries, as well as whether they changed their government that year.
year, corruption, change of president 2001, 5, 0 2002, 7, 1 2003, 8, 0 etc.
I want to test whether corruption is affected by a change in power (defined as the election of a new president who isn't part of the same political party as the previous one).
The idea is to either look at the slope of corruption/year for the two years leading into the election, and the two years after, e.g. $t-2$, $t-1$ and $t$ for the before slope.
The other idea is to look at the average level of corruption three years before and after.
The rate might make more sense since there are more things that affect corruption and different countries may be on different trajectories. However, there could also be some benefit to just looking at average levels three years before and after.
Any thoughts on which one I should look at, and also how to go about measuring this?