Skip to main content

Research Repository

Advanced Search

Speaking Stata: Getting by without the by() option: Some graphics for unequal groups

Cox, Nicholas J.

Speaking Stata: Getting by without the by() option: Some graphics for unequal groups Thumbnail


Authors



Abstract

The by() option of the graph command is often used to show groups or subsets of some data in separate panels or facets of a graphical display. If groups are unequal in size, the result may seem awkward or inefficient in use of space. Devices to allow such groups to be shown directly without using a by() option are explained and exemplified for graph dot and its siblings and for graph twoway. New variables to show rank within groups and (if needed) separation of groups are easily constructed. Group summaries such as medians may easily be added. Graph types shown are dot charts, quantile plots, and displays using spikes to show differences between variables. Data examples are for ocean salinity and changes in weight of anorexic girls.

Citation

Cox, N. J. (2024). Speaking Stata: Getting by without the by() option: Some graphics for unequal groups. The Stata Journal, 24(4), 766-776. https://doi.org/10.1177/1536867X241297949

Journal Article Type Article
Acceptance Date Oct 14, 2024
Online Publication Date Dec 24, 2024
Publication Date 2024-12
Deposit Date Feb 21, 2025
Publicly Available Date Feb 21, 2025
Journal Stata Journal
Print ISSN 1536-867X
Electronic ISSN 1536-8734
Publisher SAGE Publications
Peer Reviewed Peer Reviewed
Volume 24
Issue 4
Pages 766-776
DOI https://doi.org/10.1177/1536867X241297949
Public URL https://durham-repository.worktribe.com/output/3492366

Files





You might also like



Downloadable Citations