Statalist The Stata Listserver


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

st: RE: graph query


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: graph query
Date   Tue, 10 Oct 2006 11:43:04 +0100

First, know that "stratum" is the singular of "strata". 
This piece of Latin will come in very useful during 
your statistical career. 

Neil Shephard already gave a helpful answer. His 
reference to an article by myself in the Stata Journal

2004. Speaking Stata: Graphing categorical and compositional
data. The Stata Journal 2:190-123 (Abstract :
http://ideas.repec.org/a/tsj/stataj/v4y2004i2p190-213.html).

is however a little awry in terms of volume and page numbers, 
which should be 4(2): 190-215. 

An analogue of your question is easily seen with 

. sysuse auto, clear 
. tab foreign rep78, row 

Two commands that might be useful for you are -catplot-
and -tabplot-, both downloadable from SSC. For example, 

. tabplot foreign rep78 , percent(rep78) show(format(%4.1f))

is to my mind a little more interesting than more
conventional bar charts. 

Nick
[email protected] 

Lukar Thornton sent an HTML message, contrary 
to Statalist protocol. Here is the plain text: 

I have some data that I would like to fit onto a single graph (see below)
 
I want a vertical bar graph with the ffintake_ord categories along the 
x-axis with 3 vertical lines for each category to represent the percentages 
for each strata.

Is this possible and if so how do I do it?
 
 
           |           ffintake_ord
    Strata |         0          1          2 |     Total
-----------+---------------------------------+----------
         1 |       523        284         61 |       868 
           |     60.25      32.72       7.03 |    100.00 
-----------+---------------------------------+----------
         2 |       495        281         80 |       856 
           |     57.83      32.83       9.35 |    100.00 
-----------+---------------------------------+----------
         3 |       359        256         96 |       711 
           |     50.49      36.01      13.50 |    100.00 
-----------+---------------------------------+----------
     Total |     1,377        821        237 |     2,435 
           |     56.55      33.72       9.73 |    100.00
 

*
*   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/



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