Hello,
I have panel data of individuals who are born in a particular year and die in another year. Some individuals are of group A, and others are of group B. In addition, each individual lives in a specific location. In some of the locations, a reform was implemented. The introduction is staggered: in each location, the reform is introduced in a different year, and once it is introduced it is persistent.
To be completely clear, this is my data structure:
I want to estimate the effect of the reform interacted with being in group A on the survival rate on the individuals. Hence I need to combine a Triple Diff-in-Diff with a Cox survival analysis.
I am unsure how to do this in terms of structuring the data, setting it, and running the regression.
Thank you very much.
I have panel data of individuals who are born in a particular year and die in another year. Some individuals are of group A, and others are of group B. In addition, each individual lives in a specific location. In some of the locations, a reform was implemented. The introduction is staggered: in each location, the reform is introduced in a different year, and once it is introduced it is persistent.
To be completely clear, this is my data structure:
ID | YEAR | REFORM | GROUP | ALIVE |
1 | 1 | 0 | A | 1 |
1 | 2 | 0 | A | 1 |
1 | 3 | 0 | A | 1 |
1 | 4 | 1 | A | 0 |
1 | 5 | 1 | A | 0 |
2 | 1 | 0 | B | 0 |
2 | 2 | 0 | B | 1 |
2 | 3 | 0 | B | 1 |
2 | 4 | 0 | B | 0 |
2 | 5 | 0 | B | 0 |
3 | 1 | 0 | A | 0 |
3 | 2 | 1 | A | 0 |
3 | 3 | 1 | A | 1 |
3 | 4 | 1 | A | 1 |
3 | 5 | 1 | A | 1 |
4 | 1 | 0 | B | 1 |
4 | 2 | 0 | B | 1 |
4 | 3 | 1 | B | 1 |
4 | 4 | 1 | B | 1 |
4 | 5 | 1 | B | 0 |
I want to estimate the effect of the reform interacted with being in group A on the survival rate on the individuals. Hence I need to combine a Triple Diff-in-Diff with a Cox survival analysis.
I am unsure how to do this in terms of structuring the data, setting it, and running the regression.
Thank you very much.
Comment