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


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

st: Histogram, with customize intervals


From   Syed Basher <syed.basher@yahoo.com>
To   Statalist <statalist@hsphsun2.harvard.edu>
Subject   st: Histogram, with customize intervals
Date   Mon, 9 May 2011 00:54:59 -0700 (PDT)

Dear Stata users,

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.


--
Syed Abul Basher
Qatar Central Bank
P.O. Box 1234
Doha, Qatar.
http://www.syedbasher.org/ ;

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


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