Announcement

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

  • Applying Callaway & Sant'Anna (2021) Staggered DiD- variation in timing of the reform

    Hi,

    I am trying to see the effect of a certain reform and an outcome. The variation comes from the random timing of implementing the reform across municipalities. At the same time, within municipalities, only some cohorts of people were treated by the reform. I am a little confused about how I should apply the CS DID in this case. Data example is below. Of course I start by having one row per person. How should I think about my Diff in Diff in this context and how should I use the csdid package?

    Thanks

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input byte municipality int(person_id cohort first_cohort_affected) byte(treated outcome)
    1  1 1900 1902 0 0
    1  1 1900 1902 0 0
    1  1 1900 1902 0 0
    1  1 1900 1902 0 0
    1  2 1901 1902 0 1
    1  2 1901 1902 0 1
    1  2 1901 1902 0 1
    1  2 1901 1902 0 1
    1  2 1901 1902 0 1
    1  3 1901 1902 0 0
    1  3 1901 1902 0 0
    1  4 1901 1902 0 0
    1  5 1902 1902 1 1
    1  5 1902 1902 1 1
    1  5 1902 1902 1 1
    1  5 1902 1902 1 1
    1  5 1902 1902 1 1
    1  5 1902 1902 1 1
    1  5 1902 1902 1 1
    1  6 1902 1902 1 1
    1  6 1902 1902 1 1
    1  6 1902 1902 1 1
    1  6 1902 1902 1 1
    1  6 1902 1902 1 1
    1  6 1902 1902 1 1
    1  7 1903 1902 1 0
    1  7 1903 1902 1 0
    1  8 1903 1902 1 1
    1  8 1903 1902 1 1
    2  9 1901 1904 0 0
    2  9 1901 1904 0 0
    2  9 1901 1904 0 1
    2 10 1902 1904 0 1
    2 10 1902 1904 0 1
    2 10 1902 1904 0 0
    2 10 1902 1904 0 1
    2 11 1903 1904 0 0
    2 11 1903 1904 0 0
    2 12 1904 1904 1 1
    2 12 1904 1904 1 1
    2 12 1904 1904 1 0
    2 13 1904 1904 1 1
    2 13 1904 1904 1 1
    2 14 1905 1904 1 0
    2 14 1905 1904 1 0
    2 14 1905 1904 1 1
    2 15 1906 1904 1 0
    2 15 1906 1904 1 0
    2 16 1906 1904 1 1
    2 16 1906 1904 1 1
    end
    Last edited by Neg Kha; 27 Nov 2025, 08:50.

  • #2
    Can someone help with this please?

    Comment


    • #3
      I'm not sure I completely understand the setup. You have a treatment that varies at the person level, correct? So in the csdid command you should define the cohort at the level of the individual. Then use ivar(person_id) time(?) gvar(cohort). I don't actually know what your time variable is here. Is it one of the colums with 1900, and so on? If I look at person_id = 3 it is untreated over the two periods, but you've defined cohort to be 1901. That won't work with csdid.

      Comment


      • #4
        Originally posted by Jeff Wooldridge View Post
        I'm not sure I completely understand the setup. You have a treatment that varies at the person level, correct? So in the csdid command you should define the cohort at the level of the individual. Then use ivar(person_id) time(?) gvar(cohort). I don't actually know what your time variable is here. Is it one of the colums with 1900, and so on? If I look at person_id = 3 it is untreated over the two periods, but you've defined cohort to be 1901. That won't work with csdid.
        Hi,

        Thanks for your response! Sorry for the messy setup. I try to explain better here: There is a reform that happens in the country that is implemented on various cohorts of people at different times in different municipalities. For example, in municipality 1, they implement it in 1920 and all the people who were born from 1902 onwards are treated.In municipality 2, they implement it in 1922 and people who were born from 1904 onwards are treated, and so on. Basically the year of implementation decides which cohorts are affected. Because the people who would be affected must be a certain age. Does that make better sense?
        Last edited by Neg Kha; 04 Dec 2025, 03:53.

        Comment


        • #5
          In a sense two individuals born in the same year, where one was resident in a municipality that had already implemented the reform and one in a municipality had not yet implemented the same reform, have different exposures to the reform. This gives us variation in reform exposure both over time and across municipalities

          Comment

          Working...
          X