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]

Re: st: zoom on histograms


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: zoom on histograms
Date   Tue, 2 Oct 2012 23:29:26 +0100

The objection to subsetting with -if- is presumably that the densities
and/or fractions will no longer be correct.

There's a nice Tip on this in the Stata Journal:

SJ-5-2  gr0014  . . . . . . . Stata tip 20: Generating histogram bin variables
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . D. A. Harrison
        Q2/05   SJ 5(2):280--281                                 (no commands)
        tip illustrating the use of twoway__histogram_gen for
        creation of complex histograms and other graphs or tables

http://www.stata-journal.com/sjpdf.html?articlenum=gr0014

Note that -search histogram- would have pointed you to this. The
Statalist FAQ advises a use of -search- before posting.

Nick

On Tue, Oct 2, 2012 at 9:56 PM, patrick patrick <verbatimo@hotmail.fr> wrote:

> I have a very simple question, but I did not find the answer in the manual (or on the statalist server)
>
> Let's say I need to run -hist Y which gives me the histogram distribution of Y.
> The problem is that, as Y has a wide range, the whole plot is not very readable and so I would like to plot only a subset of that histogram.. for example only keeping small (or big) values for Y.
> In essence, I just would like to zoom on my graph!
> Of course I cannot run -hist Y if abs(Y)<10 because Stata would build an histogram on that subset of the data...
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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