I would like to do a difference-in-differences analysis to compare units who received a treatment vs units who did not receive treatment. I found a good article that described how to do difference-in-differences in SAS; article can be found here
The problem I have is that each unit received treatment at different dates; therefore, I have a staggered treatment design. The article describes how to do difference-in-differences if all units receive treatment at the same time, but I can't find how to run such an analysis when the treatment is staggered. I want to point out that creating the model in SAS isn't much of an issue for me. What I need assistance in is how to incorporate some of the newer methods that are described in the following article: https://cran.r-project.org/web/packages/did/vignettes/did-basics.html.
TLDR: Is there a guideline on how to run staggered DiD in SAS that uses the newer methods that were proposed by Callaway and Sant'Anna?
Can't you just set the start date for each unit to zero, and then work with the number of elapsed days?
Perhaps you could use the EFFECT statement to fit a spline to the start dates to deal with the suspected change in the treatment effect, and use @PaigeMiller 's suggestion of fitting elapsed days as the independent variable. You would probably need an interaction term. This would fit a response surface for your DiD data. Does that make any sense?
SteveDenham
@SteveDenham wrote:
Perhaps you could use the EFFECT statement to fit a spline to the start dates to deal with the suspected change in the treatment effect, and use @PaigeMiller 's suggestion of fitting elapsed days as the independent variable. You would probably need an interaction term. This would fit a response surface for your DiD data. Does that make any sense?
SteveDenham
@SteveDenham I was thinking a similar thing, somehow add the effect of the treatment by actual calendar date into the model somehow. But you beat me to it!
It doesn't really matter that the treatment isn't applied at the same time for each subject. The model just needs an indicator of pre- vs. post-treatment, whenever it actually occurs. See the repeated measures sections of this note.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.