To cite did2s in publications use:

Butts K (2021). did2s: Two-Stage Difference-in-Differences Following Gardner (2021). https://github.com/kylebutts/did2s/.

Corresponding BibTeX entry:

  @Manual{,
    title = {did2s: Two-Stage Difference-in-Differences Following
      Gardner (2021)},
    author = {Kyle Butts},
    year = {2021},
    url = {https://github.com/kylebutts/did2s/},
  }