Hello everyone,
I would like to perform a difference-in-difference (DiD) analysis on my panel data (set to areg with country fixed effects, year fixed effects). The trick is, the treatment occurs at different years for different units (countries).
The y variable I am regressing is trade liberalisation ("tradelib") and the x variable is a measure of democracy ("demo"). The year a country introduces universal suffrage is the treatment; I have created a dummy variable that codes the year of the treatment as 1 and years prior & after as 0.
I'm just wondering what stata code I can use to run a regression since this can't be just a simple difference of means regression, given that treatment occurs at different years for different units.
Thanks.
Ashvinder
I would like to perform a difference-in-difference (DiD) analysis on my panel data (set to areg with country fixed effects, year fixed effects). The trick is, the treatment occurs at different years for different units (countries).
The y variable I am regressing is trade liberalisation ("tradelib") and the x variable is a measure of democracy ("demo"). The year a country introduces universal suffrage is the treatment; I have created a dummy variable that codes the year of the treatment as 1 and years prior & after as 0.
I'm just wondering what stata code I can use to run a regression since this can't be just a simple difference of means regression, given that treatment occurs at different years for different units.
Thanks.
Ashvinder
Comment