Home  >>  Archives  >>  Volume 7 Number 3  >>  gr0028

The Stata Journal
Volume 7 Number 3: pp. 413-433



Subscribe to the Stata Journal
cover

Speaking Stata: Turning over a new leaf

Nicholas J. Cox
Department of Geography
Durham University
Durham City, UK
[email protected]
Abstract.   Stem-and-leaf displays have been widely taught since John W. Tukey publicized them energetically in the 1970s. They remain useful for many distributions of small or modest size, especially for showing fine structure such as digit preference. Stata’s implementation stem produces typed text displays and has some inevitable limitations, especially for comparison of two or more displays. One can re-create stem-and-leaf displays with a few basic Stata commands as scatterplots of stem variable versus position on line with leaves shown as marker labels. Comparison of displays then becomes easy and natural using scatter, by(). Back-to-back presentation of paired displays is also possible. I discuss variants on standard stem-and-leaf displays in which each distinct value is a stem, each distinct value is its own leaf, or axes are swapped. The problem shows how one can, with a few lines of Stata, often produce standard graph forms from first principles, allowing in turn new variants. I also present a new program, stemplot, as a convenience tool.
Terms of use     View this article (PDF)

View all articles by this author: Nicholas J. Cox

View all articles with these keywords: stemplot, stem-and-leaf, graphics, distributions, digit preference

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS