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

From |
David Radwin <radwin@berkeley.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Suggestions for Second Edition of A Visual Guide to Stata Graphics |

Date |
Thu, 26 Jul 2007 10:22:04 -0700 |

At 5:45 AM -0500 7/25/07, Fred Wolfe wrote:

I concur, and more generally I would like to see more examples using categorical data in graphs, particularly bar graphs or histograms comparing two or more groups. The graphs in the book generally report means, medians, percentages, and sums, but few if any graphs (except pie graphs) report percentages or proportions where the total of the categories (or the total within a group) add to 100% or 1.

Converting proportions to percentages is a frequent task. Maybe adding some lines of code to do simple tasks like this would be helpful.

In other words, I would like more examples analogous to -catplot- but with greater control over formatting.

There may not be a simple way to create such graphs. For example, recently I tried to produce a graph similar to the "tornado plot" or "population pyramid" at http://www.ats.ucla.edu/stat/stata/Library/GraphExamples/code/twobar4.htm (in the book's appendix) except with the values (bars) for each group (male and female in the above example) adding up to 100% each. I found that -histogram- will give you the correct shape but not enough control to place the labels (percentages) at the ends of the bars. Ultimately my solution was to -collapse- the dataset to calculate the percentages and then to overlap two bar and two scatter graphs, but the coding was not terribly elegant or efficient.

That said, this is still a great book to learn from and I am looking forward to the 2nd edition. Thank you for soliciting suggestions.

David

--

David Radwin, Principal Analyst // radwin@berkeley.edu

Office of Student Research, University of California, Berkeley

*

* For searches and help try:

* http://www.stata.com/support/faqs/res/findit.html

* http://www.stata.com/support/statalist/faq

* http://www.ats.ucla.edu/stat/stata/

**References**:**st: Suggestions for Second Edition of A Visual Guide to Stata Graphics***From:*"Michael Mitchell" <mnm@ucla.edu>

**Re: st: Suggestions for Second Edition of A Visual Guide to Stata Graphics***From:*Fred Wolfe <fwolfe@arthritis-research.org>

- Prev by Date:
**RE: st: Stata10 SE and do files editor** - Next by Date:
**Re: st: Stata10 SE and do files editor** - Previous by thread:
**Re: st: Suggestions for Second Edition of A Visual Guide to Stata Graphics** - Next by thread:
**st: Re: Suggestions for Second Edition of A Visual Guide to Stata Graphics** - Index(es):

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