Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: graph frequencies

From   n j cox <>
Subject   Re: st: graph frequencies
Date   Thu, 23 Sep 2004 13:48:56 +0100

Giovanni Bader

I'd like to have a bar chart showing frequencies (percents) of categorical variables (death and heart failure , both yes/no, for example). Basically I want the percentages of death in patient with and without heart failure.
The program fbar does the job:

.fbar heartf, by(death) stack percent.

How can I get the same result with Stata8.2 ?


. ssc inst catplot
. whelp catplot

and then something like

. catplot bar heartf death, stack percent(death) asyvars

* For searches and help try:

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