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

Re: st: Table output, how to get percent of row total?


From   Nick Winter <[email protected]>
To   [email protected]
Subject   Re: st: Table output, how to get percent of row total?
Date   Tue, 07 Oct 2003 16:40:42 -0400


Stata's -table- command does not do row percentages. Check out my -tablecol-, available from the ssc archives; it may give you what you want/need.

-Nick Winter

At 12:58 PM 10/7/2003 -0700, you wrote:

Hi,

I need to create a table which contains percent of row total and frequency.
I've been looking through table and tabdisp and haven't figured it out.

The table I am looking for is very similar to the following. From
http://www.biomedcentral.com/1472-6963/3/4/table/T1
------------------------------------------------------------
Characteristics of diabetic subjects according smoking status. Figures are
frequencies (percent of row total).



                        Never smoked (968)      Current smoker (296)
Ex-smoker (582) All


Sex     Men             374 (40)                        166 (18)
361 (39)                928
        Women           594 (61)                        130 (13)
221 (23)                971
Age Group (Years)
        < 45            117 (53)                        60 (27)
42 (19)         219
        45-54           126 (57)                        49 (22)
45 (20)         221
        55-64           281 (54)                        78 (15)
151 (29)                520
        65-74           263 (47)                        78 (14)
200 (36)                556
        ? 75            158 (48)                        25 (8)
134 (41)                326
        Not known       23 (40)                 6 (11)                  10
(18)            57

------------------------------------------------------------
Thanks for your help!

Dan
____________________________________________
Daniel R. Sabath M.Sc.   Research Consultant
 Dept. of Surgery              325 Ninth Ave
 Harborview Injury Prevention     Box 359960
   and Research Center     Seattle, WA 98104
 [email protected]     (206) 521-1549



*
*   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/
--------------------------------------------------------------------
Nicholas Winter
Assistant Professor
Department of Government
Cornell University
*
* 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