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

st: Re: Frequencies and proportions side by side in tables


From   Roger Newson <[email protected]>
To   [email protected]
Subject   st: Re: Frequencies and proportions side by side in tables
Date   Fri, 23 Jan 2004 15:20:52 +0000

At 06:33 23/01/04 -0800, Nikos Pantazis wrote:
Hi statalisters,
Is there a way to show tables of frequencies and
proportions (row or column) like in the tabulate
command but with the proportions side by side with the
frequencies?

Something like (row proportions case):


         Education Level
         High      |  Low
Gender   N (%)     |  N(%)
-------------------------------
Male     4 (40.0)  |  6  (60.0)
Female   3 (15.0)  |  17 (85.0)
--------------------------------
One possibility might be to use my -xcontract- package (downloadable from SSC) to create an output data set with 1 observation per combination of values and data on frequencies and percentages, and then to -list- this data set, possibly after using the official Stata -reshape- command to reshape the data set. The -xcontract- package requires Stata 8 and is downloadable from SSC. In Stata, type

ssc desc xcontract

to find out more.

I hope this helps.

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]
Website: http://www.kcl-phs.org.uk/rogernewson

Opinions expressed are those of the author, not the institution.

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