Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Histogram, with customize intervals


From   Syed Basher <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Histogram, with customize intervals
Date   Mon, 9 May 2011 02:46:11 -0700 (PDT)

Thank you Nick for very helpful advice.

 -- Syed


----- Original Message -----
> From: Nick Cox <[email protected]>
> To: [email protected]
> Cc: 
> Sent: Monday, May 9, 2011 11:16 AM
> Subject: Re: st: Histogram, with customize intervals
> 
> -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.)
> 
> Nick
> 
> On Mon, May 9, 2011 at 8:54 AM, Syed Basher <[email protected]> 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:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index