IDEAS home Printed from https://ideas.repec.org/c/boc/bocode/s456886.html
 

HANGROOT: Stata module creating a hanging rootogram comparing an empirical distribution to the best fitting theoretical distribution

Author

Listed:
  • Maarten L. Buis

    (University of Konstanz)

Programming Language

Stata

Abstract

hangroot draws a hanging rootogram comparing the empirical distribution of a variable to the best fitting theoretical distribution. It is an alternative for histogram with the theoretical density function plotted on top. It differs from a histogram in two ways: 1) Instead of showing the freqencies it shows the square root of the frequencies. This way deviations in the tails, where the counts are small, become more visible. 2) The spikes or bars "hang" from the theoretical distribution instead of "standing" on the x-axis. The deviations are now shown as deviations from a horzontal line (y=0) instead of deviations from a curve (the density function). This makes it easier to spot patterns in the deviations.

Suggested Citation

  • Maarten L. Buis, 2007. "HANGROOT: Stata module creating a hanging rootogram comparing an empirical distribution to the best fitting theoretical distribution," Statistical Software Components S456886, Boston College Department of Economics, revised 18 May 2011.
  • Handle: RePEc:boc:bocode:s456886
    Note: This module should be installed from within Stata by typing "ssc install hangroot". The module is made available under terms of the GPL v3 (https://www.gnu.org/licenses/gpl-3.0.txt). Windows users should not attempt to download these files with a web browser.
    as

    Download full text from publisher

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangroot.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangroot.hlp
    File Function: help file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_beta.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_chi2.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_dagum.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_exponential.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_fisk.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_gamma.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_gb2.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_geometric.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_gev.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_gumbel.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_invgamma.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_laplace.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_logistic.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_lognormal.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_nb1.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_nb2.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_normal.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_pareto.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_poisson.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_sm.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_theoretical.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_uniform.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_wald.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_weibull.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_zinb.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_zip.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_parsedist.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_parseopts.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_parsesample.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_histgen.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_histgensims.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_sims.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_ci.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangr_graph.ado
    File Function: program code
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/h/hangroot_ex.ado
    File Function: sample file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/citybudget.dta
    File Function: sample data file
    Download Restriction: no

    File URL: http://fmwww.bc.edu/repec/bocode/c/cavalry.dta
    File Function: sample data file
    Download Restriction: no
    ---><---

    Citations

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


    Cited by:

    1. Vladimir Hlasny, 2021. "Parametric representation of the top of income distributions: Options, historical evidence, and model selection," Journal of Economic Surveys, Wiley Blackwell, vol. 35(4), pages 1217-1256, September.

    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:boc:bocode:s456886. 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.

    We have no bibliographic references for this item. You can help adding them by using 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 (email available below). General contact details of provider: https://edirc.repec.org/data/debocus.html .

    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.