Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: The answer: Population-pyramid-like graph - positive barlabels on the left?

From   "Nick Cox" <>
To   <>
Subject   st: RE: The answer: Population-pyramid-like graph - positive barlabels on the left?
Date   Tue, 1 Aug 2006 20:34:09 +0100

I won't repeat comments I made earlier in the thread -- 
giving criticisms of this back-to-back design -- 
but will just add one more. 

The back-to-back format suggests pairing, as does 
your "pyramid" terminology. But the pairing is one
of rank only. In that situation, if the bars for men
went from left-to-right, not right-to-left, the intended
interpretation might come more naturally.  


Gawrich Stefan
> Took me some time to find out, but the solution to the 
> question I posted
> last week is rather simple in the end:
> I wanted to create a population-pyramid-like graph for 
> sex-specific cancer
> frequencies (sorted by sex-specific rank) with all-positive 
> barlabels):
>                   Men                          Women
> Prostate   ************26********  *********32*************   Breast 
> Colon            ********19******  ******24***********        Colon
> Lung               *******14*****  ****13********             Lung
> Stomach                    ***7**  **6***                     
> Ovaries  
> etc.
> (In fact, it's the same double bars but otherwise doesn't 
> have too much in
> common with the pop-pyramid.) 
> This graph can be done by combining two hbar graphs:
> The men's graph is "mirrored" with the "yreverse" option (so 
> that bars go
> from right to left without having to use negative numbers). 
> The woman's graph has a "xalternative" option, so that 
> category labels are
> on the right.
> For both sexes, each graph shows the n most frequent disease groups in
> frequency order.
> I do this by collapsing sex-specific cases by disease 
> category and computing
> a descending ranks var, by which the over-var is sorted in the graph
> command.

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index