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

From |
Svend Juul <SJ@SOCI.AU.DK> |

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

Subject |
Re: st: [Fwd: help in obtaining a bar graph] |

Date |
Wed, 13 Aug 2008 09:39:45 +0200 |

Rich wrote: I have two variables defined as shown in the following table: | event type1 | N Y | Total -----------+----------------------+---------- N | 4,403 166 | 4,569 | 53.35 31.44 | 52.03 -----------+----------------------+---------- Y | 3,850 362 | 4,212 | 46.65 68.56 | 47.97 -----------+----------------------+---------- Total | 8,253 528 | 8,781 | 100.00 100.00 | 100.00 I want a bar graph showing 4 bars as follows: 166/528 and 4569/8781 362/528 and 4212/8781 I.e., I want the Y and Total columns rather than the N and Y columns. I have no idea how to get this and any help/ideas would be greatly appreciated. Note that I can live with having 6 bars (2 for the N column in addition) if I have to. =============================================================== I can't suggest an exact solution. But I believe that stacked bars may be useful. Try: generate x=1 graph bar (count) x , over(type1) over(event) asyvars stack Hope this helps Svend __________________________________________ Svend Juul Institut for Folkesundhed, Afdeling for Epidemiologi (Institute of Public Health, Department of Epidemiology) Vennelyst Boulevard 6 DK-8000 Aarhus C, Denmark Phone: +45 8942 6090 Home: +45 8693 7796 Email: sj@soci.au.dk __________________________________________ * * 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/

- Prev by Date:
**Re: st: Two-Way Fixed Effect Estimation** - Next by Date:
**st: Report of weighted cell counts or observations in a survey report** - Previous by thread:
**st: [Fwd: help in obtaining a bar graph]** - Next by thread:
**st: Two-Way Fixed Effect Estimation** - Index(es):

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