Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Difference-in-Difference with treatment for different years for different units

    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

  • #2
    Originally posted by Ashvinder Singh View Post
    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
    Sorry, I meant to say I have coded the year of the treatment as 0, and all the years after as 1. The years before the treatment and other control variables were coded as 0.

    Comment


    • #3
      Please have a look at the following paper (with Stata code/data): http://faculty.haas.berkeley.edu/ross_levine/papers.htm; "Big Bad Banks: The Winners and Losers from Bank Deregulation in the United States." (with Thorsten Beck and Alexey Levkov) Journal of Finance, October 2010, 1637-1667.
      Ho-Chuan (River) Huang
      Stata 17.0, MP(4)

      Comment


      • #4
        Thank you very much, River.

        Comment

        Working...
        X