This is an example function of how to make an event study graph in stata.
It uses code posted by Andrew Goodman-Bacon (https://twitter.com/agoodmanbacon/status/1165643395844493313?s=20) and code from projects with Ivan Rudik.
The divorce data come from Stevenson and Wolfers 2006, http://users.nber.org/~jwolfers/data/DivorceData(QJE).zip.
Feel free to edit/use as you please.