Home  >>  Archives  >>  Volume 9 Number 3  >>  gr0039

The Stata Journal
Volume 9 Number 3: pp. 478-496



Subscribe to the Stata Journal
cover

Speaking Stata: Creating and varying box plots

Nicholas J. Cox
Department of Geography
Durham University
Durham City, UK
[email protected]
Abstract.  Box plots have been a standard statistical graph since John W. Tukey and his colleagues and students publicized them energetically in the 1970s. In Stata, graph box and graph hbox are commands available to draw box plots, but sometimes neither is sufficiently flexible for drawing some variations on standard box plot designs. This column explains how to use egen to calculate the statistical ingredients needed for box plots and twoway to re-create the plots themselves. That then allows variations such as adding means, connecting medians, or showing all data points beyond certain quantiles.
Terms of use     View this article (PDF)

View all articles by this author: Nicholas J. Cox

View all articles with these keywords: box plots, dispersion diagrams, distributions, egen, graphics, percentile, quantile, range bars, twoway

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS