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
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

Comment