IDEAS home Printed from https://ideas.repec.org/a/tsj/stataj/v9y2009i3p478-496.html
   My bibliography  Save this article

Speaking Stata: Creating and varying box plots

Author

Listed:
  • Nicholas J. Cox

    (Durham University, UK)

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.

Suggested Citation

  • Nicholas J. Cox, 2009. "Speaking Stata: Creating and varying box plots," Stata Journal, StataCorp LP, vol. 9(3), pages 478-496, September.
  • Handle: RePEc:tsj:stataj:v:9:y:2009:i:3:p:478-496
    as

    Download full text from publisher

    File URL: http://www.stata-journal.com/article.html?article=gr0039
    File Function: link to article download
    Download Restriction: no

    File URL: http://www.stata-journal.com/software/sj9-3/gr0039/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Dumbgen, Lutz & Riedwyl, Hans, 2007. "On Fences and Asymmetry in Box-and-Whiskers Plots," The American Statistician, American Statistical Association, vol. 61, pages 356-359, November.
    2. Nicholas J. Cox, 2002. "Speaking Stata: On getting functions to do the work," Stata Journal, StataCorp LP, vol. 2(4), pages 411-427, November.
    3. James Cui, 2007. "Stata tip 42: The overlay problem: Offset for clarity," Stata Journal, StataCorp LP, vol. 7(1), pages 141-142, February.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Vincenzo Verardi, 2013. "Semiparametric regression in Stata," United Kingdom Stata Users' Group Meetings 2013 14, Stata Users Group.
    2. Michael M. Moedl, 2021. "Two’s a company, three’s a crowd: Deal breaker terms in equity crowdfunding for prospective venture capital," Small Business Economics, Springer, vol. 57(2), pages 927-952, August.
    3. Wanru Xiong, 2023. "Love is Elsewhere: Internal Migration and Marriage Prospects in China," European Journal of Population, Springer;European Association for Population Studies, vol. 39(1), pages 1-29, December.
    4. Flavio Calvino & Chiara Criscuolo & Carlo Menon, 2018. "A cross-country analysis of start-up employment dynamics," Industrial and Corporate Change, Oxford University Press and the Associazione ICC, vol. 27(4), pages 677-698.
    5. Boris Branisa & Carolina Cardona, 2015. "Social Institutions and Gender Inequality in Fragile States: Are they relevant for the Post-MDG Debate?," Development Research Working Paper Series 06/2015, Institute for Advanced Development Studies.
    6. Landoni, Mattia, 2018. "Tax distortions and bond issue pricing," Journal of Financial Economics, Elsevier, vol. 129(2), pages 382-393.
    7. Martin Kesternich, 2016. "Minimum participation rules in international environmental agreements: empirical evidence from a survey among delegates in international climate negotiations," Applied Economics, Taylor & Francis Journals, vol. 48(12), pages 1047-1065, March.
    8. Lubomira Gertler, 2015. "Interactions of Unconventional Monetary Policy Measures with the Euro Area Yield Curve," Czech Journal of Economics and Finance (Finance a uver), Charles University Prague, Faculty of Social Sciences, vol. 65(2), pages 106-126, March.
    9. Poddar, Sourav & Sarat Chandra Babu, J., 2021. "Modelling and optimization of a pyrolysis plant using swine and goat manure as feedstock," Renewable Energy, Elsevier, vol. 175(C), pages 253-269.
    10. Guillaume Trotignon & Ellen Jones & Thomas Engels & Elena Schmidt & Deborah A McFarland & Colin K Macleod & Khaled Amer & Amadou A Bio & Ana Bakhtiari & Sarah Bovill & Amy H Doherty & Asad Aslam Khan , 2017. "The cost of mapping trachoma: Data from the Global Trachoma Mapping Project," PLOS Neglected Tropical Diseases, Public Library of Science, vol. 11(10), pages 1-19, October.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Alejandro Arenas Alzate, 2021. "Mejores colegios en Colombia: efecto de las condiciones socioeconómicas sobre el desempeno escolar," Documentos de Trabajo de Valor Público 19829, Universidad EAFIT.
    2. Nicholas J. Cox, 2011. "Speaking Stata: Fun and fluency with functions," Stata Journal, StataCorp LP, vol. 11(3), pages 460-471, September.
    3. Stephen McDonald & Colin Wren, 2018. "Multibrand pricing as a strategy for consumer search obfuscation in online markets," Journal of Economics & Management Strategy, Wiley Blackwell, vol. 27(2), pages 171-187, June.

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:tsj:stataj:v:9:y:2009:i:3:p:478-496. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum or Lisa Gilmore (email available below). General contact details of provider: http://www.stata-journal.com/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.