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" <>
To   <>
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 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
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322

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

-----Original Message-----
[] 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?

*   For searches and help try:

*   For searches and help try:

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