The standard DifferenceinDifferences (DID) setup involves two periods and two groups  a treated group and untreated group. Many applications of DID methods involve more than two periods and have individuals that are treated at different points in time. This package contains tools for computing average treatment effect parameters in Difference in Differences setups with more than two periods and with variation in treatment timing using the methods developed in Callaway and Sant'Anna (2021) <doi:10.1016/j.jeconom.2020.12.001>. The main parameters are grouptime average treatment effects which are the average treatment effect for a particular group at a a particular time. These can be aggregated into a fewer number of treatment effect parameters, and the package deals with the cases where there is selective treatment timing, dynamic treatment effects, calendar time effects, or combinations of these. There are also functions for testing the Difference in Differences assumption, and plotting grouptime average treatment effects.
Package details 


Author  Brantly Callaway [aut, cre], Pedro H. C. Sant'Anna [aut] 
Maintainer  Brantly Callaway <brantly.callaway@uga.edu> 
License  GPL2 
Version  2.1.1 
URL  https://bcallaway11.github.io/did/ https://github.com/bcallaway11/did/ 
Package repository  View on CRAN 
Installation 
Install the latest version of this package by entering the following in R:

Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.