Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# st: new version hangroot available from SSC

 From Maarten Buis To statalist@hsphsun2.harvard.edu Subject st: new version hangroot available from SSC Date Fri, 18 Nov 2011 16:46:05 +0100

```Thanks to Kit Baum a new version of the -hangroot- package is now
available from SSC. A hanging rootogram is graph for comparing the
distribution of a variable with a theoretical distribution. It is a
variation on a histogram with the density function of a normal
distribution plotted on top of it, in that the bars are "hanging" from
the normal distribution rather than "standing" on the x-axis. This way
the deviations from the theoretical distribution are visible as
deviations from the horizontal line y=0, making it much easier to spot
patterns in these deviations. Moreover, the y-axis is changed to
represent the square root of the frequencies rather than frequencies.
The logic behind that is that the frequencies can be thought of as
counts and large counts tend to be more variable than small counts.
This way it becomes hard to compare the residuals from large bars with
small bars. The square root transformation tends to make the variance
more equal, and thus making it easier to compare across bins. Examples
of these graphs can be found here:
<http://www.maartenbuis.nl/software/hangroot.html>

This update contains a large number of changes:

1) It can now be used after parametric regression models with
covariates to compare the marginal distribution implied by that
regression model with the distribution of the dependent variable. The
logic is the same as that of -margdistfit-, which I announced earlier
today <http://www.stata.com/statalist/archive/2011-11/msg00926.html>.

2) It can now represent new distributions: zero inflated Poisson,
negative binomial (I and II) and the zero inflated negative binomial.

3) It can plot simulations from the theoretical distribution on top of
the graph, so that one can see what kind of variability one could
reasonably expect.

4) It has been thoroughly rewritten. Over time the -hangroot- has
grown considerably, and after such a period of "organic growth" it is
often useful to rewrite the program such that it better fits the new

To install this package type in Stata -ssc install hangroot-, to
update it type in Stata -ssc install hangroot, replace- or -adoupdate,
update-.

I hope some of you will find it useful,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```