Dr Nicholas Cox n.j.cox@durham.ac.uk
Assistant Professor
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.
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 |
Published Journal Article
(184 Kb)
PDF
Publisher Licence URL
http://creativecommons.org/licenses/by/4.0/
Stata tip 151: Puzzling out some logical operators
(2023)
Journal Article
Speaking Stata: Automating axis labels: Nice numbers and transformed scales
(2022)
Journal Article
Stata tip 148: Searching for words within strings
(2022)
Journal Article
Speaking Stata: The largest five - A tale of tail values
(2022)
Journal Article
Stata tip 145: Numbering weeks within months
(2022)
Journal Article
About Durham Research Online (DRO)
Administrator e-mail: dro.admin@durham.ac.uk
This application uses the following open-source libraries:
Apache License Version 2.0 (http://www.apache.org/licenses/)
Apache License Version 2.0 (http://www.apache.org/licenses/)
SIL OFL 1.1 (http://scripts.sil.org/OFL)
MIT License (http://opensource.org/licenses/mit-license.html)
CC BY 3.0 ( http://creativecommons.org/licenses/by/3.0/)
Powered by Worktribe © 2025
Advanced Search