Bookmark and Share

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, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Histogram, with customize intervals

From   Nick Cox <>
Subject   Re: st: Histogram, with customize intervals
Date   Mon, 9 May 2011 09:16:24 +0100

-hist3- is from SSC and is for Stata version 6. Remember: you are
asked to explain _where_ user-written programs you refer to come from.
Evidently the author is not maintaining it; otherwise it would have
been ported to Stata 8 long since.

If you have just two intervals, you might as well use -graph bar-.

Alternatively, see

SJ-4-1  gr0003  . . . . . . . . . . . . Speaking Stata: Graphing distributions
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
        Q1/04   SJ 4(1):66--88                                   (no commands)
        a review of official and user-written commands for
        graphing univariate distributions; includes tricks
        beyond what is obviously and readily available

for discussion of unequal bin widths in histograms.

(English idioms vary across the world, but while "some code" sounds
very natural to me to refer to one or more programs, "a code" suggests
to me only a cipher.)


On Mon, May 9, 2011 at 8:54 AM, Syed Basher <> wrote:

> I am using Stata 11.2. I want to draw a histogram for a continuous variable with the following intervals (0-250, 250-1000). I noticed that this is not straightforward in Stata. I found a user written code, "hist3", which allows me to get what I want:
> hist3 price, v(250)
> However, with hist3, the height of the bar reflects density (and area reflects frequency of the intervals). But I would like to express the height of the bar in percent (rather than density). Is there a way to do this in Stata? Thank you.
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index