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

From |
Adam Collins <ACollins@fxb.org> |

To |
"'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: display all categories on pie chart for categorical variables (with some zero values) |

Date |
Thu, 26 Nov 2009 13:21:38 +0100 |

I expect there is something really simple that I am missing here... but I am new to Stata and it is doing my head in that I can't display all categories of a categorical variable on a pie chart... I am really getting no where with this problem. I would really appreciate some help. I tried exploring ways of storing the "counts" from my categorical variable values in another variable, such as a matrix which would allow me to store a "zero count" as a "0" value. In searching for a solution, I came accross -fulltab- (from SSC), however it doesn't seem to work (it just displays the following "program error: code follows on the same line as open brace"). Anyway, I am not even sure this is the best approach. Surely there is something more straight forward? -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Adam Collins Sent: mercredi 25 novembre 2009 17:39 To: statalist@hsphsun2.harvard.edu Subject: st: display all categories on pie chart for categorical variables (with some zero values) Hello, I have several categorical variables that each possess the same list of categories (value labels). To enable easy comparison of the pie charts, I would like every category to exist on every chart (so that each category retains the same colour/settings/legend position etc on each chart). The problem is that some of the variables contain zero occurrences of certain values (categories) and the standard 'over(varname)' option with -graph pie- excludes categories with no occurrences. I have tried the 'allcategories' option, but since it applies to the 'over()' variable, it does not help. Does anyone have any ideas? (by the way, since this is for a specific set of categorical variables, it is fine if the categories are 'hard coded', then applied to each variable) Thanks again for your help! Adam * * 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/

**Follow-Ups**:**st: AW: RE: display all categories on pie chart for categorical variables (with some zero values)***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**st: AW: RE: display all categories on pie chart for categorical variables (with some zero values)***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**References**:**st: display all categories on pie chart for categorical variables (with some zero values)***From:*Adam Collins <ACollins@fxb.org>

- Prev by Date:
**Re: st: RE: RE: RE: highly skewed, highly zeroed data** - Next by Date:
**st: AW: RE: display all categories on pie chart for categorical variables (with some zero values)** - Previous by thread:
**st: display all categories on pie chart for categorical variables (with some zero values)** - Next by thread:
**st: AW: RE: display all categories on pie chart for categorical variables (with some zero values)** - Index(es):

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