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: Performance histograms
From
Maarten Buis <[email protected]>
To
[email protected]
Subject
Re: st: Performance histograms
Date
Sun, 26 Feb 2012 10:00:15 +0100
If you want a hundered bins for a hundred observations, than you are
not binning. Instead you are probably not looking for a histrogram but
instead want to use Nick Cox's -stripplot- (see: -ssc desc
stripplot-).
*---------- begin example --------------
sysuse auto, clear
gen byte id = .
forvalues i = 1/`=_N' {
replace id = _n == `i'
stripplot mpg , stack separate(id) name(gr`i')
}
*----------- end example -----------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )
Hope this helps,
Maarten
On Sun, Feb 26, 2012 at 4:52 AM, Huerta, Tim <[email protected]> wrote:
> I have 100 observations of a continuous variable - lets call it X.
>
> For each observation, I want to create a histogram of the X variable and
> then indicate in which bar that specific observation exists.
>
> I'd like to save the graph with the observation name - for instance:
> chart001
> chart002
> .
> .
> .
> chart100
>
> In excel, the graph might look like this...
> http://statalist.1588530.n2.nabble.com/file/n7318500/sample.jpg
> However, I plan to have 100 bins - so doing this 100 times, across 6
> variables would be a challenge without some efficient coding.
>
> Any ideas?
>
>
> *
> * 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/
--
--------------------------
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/