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

*Maarten Buis* ()

Statistical Software Components from Boston College Department of Economics

**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.

**Language:** Stata

**Requires:** Stata version 9.2

**Keywords:** exploratory data analysis; model diagnostics (search for similar items in EconPapers)

**Date:** 2007-11-04, Revised 2011-05-18

**Note:** This module should be installed from within Stata by typing "ssc install hangroot". Windows users should not attempt to download these files with a web browser.

**References:** Add references at CitEc

**Citations** Track citations by RSS feed

**Downloads:** (external link)

http://fmwww.bc.edu/repec/bocode/h/hangroot.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangroot.hlp help file (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_beta.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_chi2.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_dagum.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_exponential.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_fisk.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_gamma.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_gb2.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_geometric.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_gev.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_gumbel.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_invgamma.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_laplace.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_logistic.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_lognormal.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_nb1.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_nb2.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_normal.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_pareto.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_poisson.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_sm.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_theoretical.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_uniform.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_wald.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_weibull.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_zinb.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_zip.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_parsedist.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_parseopts.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_parsesample.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_histgen.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_histgensims.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_sims.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_ci.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangr_graph.ado program code (text/plain)

http://fmwww.bc.edu/repec/bocode/h/hangroot_ex.ado sample file (text/plain)

http://fmwww.bc.edu/repec/bocode/c/citybudget.dta sample data file (application/x-stata)

http://fmwww.bc.edu/repec/bocode/c/cavalry.dta sample data file (application/x-stata)

**Related works:**

This item may be available elsewhere in EconPapers: Search for items with the same title.

**Export reference:** BibTeX
RIS (EndNote, ProCite, RefMan)
HTML/Text

**Persistent link:** https://EconPapers.repec.org/RePEc:boc:bocode:s456886

**Ordering information:** This software item can be ordered from

http://repec.org/docs/ssc.php

Access Statistics for this software item

More software in Statistical Software Components from Boston College Department of Economics Boston College, 140 Commonwealth Avenue, Chestnut Hill MA 02467 USA. Contact information at EDIRC.

Bibliographic data for series maintained by Christopher F Baum ().