Statalist The Stata Listserver


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

st: RE: Making a single table of frequencies for multiple variables


From   "Newson, Roger B" <[email protected]>
To   <[email protected]>
Subject   st: RE: Making a single table of frequencies for multiple variables
Date   Thu, 12 Oct 2006 21:56:11 +0100

You might like to use the -xcontract- package, downloadable from SSC
using the -ssc- command. The -xcontract- package creates an output
dataset (or resultsset) with 1 observation per value, or per combination
of values for multiple variables, and data on frequencies or
percentages. This resultsset can be listed (in the style of the -list-
command), and/or saved to a disk file, and/or written to the memory,
overwriting any pre-existing dataset. This resultsset can be exported to
Excel using the -outsheet- command, wjhich produces a generic
spreadsheet (tab-delimited or comma-delimited) that Excel can read.

If you want to concatenate multiple resultssets, then you might want to
use the -dsconcat- command, which you can also download from SSC using
the -ssc- command.

I hope this helps.

Roger


Roger Newson
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected] 
www.imperial.ac.uk/nhli/r.newson/

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

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Rachel
Sent: 12 October 2006 21:46
To: statalist
Subject: st: Making a single table of frequencies for multiple variables

I'm doing a cluster analysis and and want to look at frequencies for a
list of 25+ variables for each of six groups.  It's easiest for me to
export the results to Excel and look at them there, so it would be
easiest to get a single table of frequencies.

But tab1 gives a separate table for each variable. Tabstat does give a
table like the one I want, but it shows only summary statistics and
not frequencies.

Does anyone know an option or command that will let me do this?

Thanks,
Rachel
*
*   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/

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