The statsby command collects statistics from a command yielding r-class or e-class results across groups of observations and yields a new reduced dataset. statsby is commonly used to graph such data in comparisons of groups; the subsets and total options of statsby are particularly useful in this regard. In this article, I give examples of using this approach to produce box plots and plots of confidence intervals.
CoxN. J.2001. Speaking Stata: How to repeat yourself without going mad. Stata Journal1: 86–97.
2.
CoxN. J.2002. Speaking Stata: How to move step by: step. Stata Journal2: 86–102.
3.
CoxN. J.2003. Speaking Stata: Problems with tables, Part I. Stata Journal3: 309–324.
4.
CoxN. J.2008. Speaking Stata: Between tables and graphs. Stata Journal8: 269–289.
5.
CoxN. J.2009. Speaking Stata: Creating and varying box plots. Stata Journal9: 478–496.
6.
NewsonR.1999. dm65: A program for saving a model fit as a dataset. Stata Technical Bulletin49: 2–6. Reprinted in Stata Technical Bulletin Reprints, vol. 9, pp. 19–23. College Station, TX: Stata Press.
7.
NewsonR.2000. dm65.1: Update to a program for saving a model fit as a dataset. Stata Technical Bulletin58: 2. Reprinted in Stata Technical Bulletin Reprints, vol. 10, p. 7. College Station, TX: Stata Press.
8.
NewsonR.2003. Confidence intervals and p-values for delivery to the end user. Stata Journal3: 245–269.