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

Re: st: RE: Export of a -tab3way- table in a tab-delimited format?


From   Roger Newson <roger.newson@kcl.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Export of a -tab3way- table in a tab-delimited format?
Date   Thu, 31 Mar 2005 16:41:16 +0100

Herve STOLOWY wrote:

> I use the -tab3way- command to cross-tabulate 3 variables. Do
> you know if there is an easy way to get the output in a
> tab-delimited format (something equivalent to -tabout- for a
> two-way table or -estout- for a regression)?
What you are looking for might be -xcontract- (downloadable from SSC), which can produce output Stata datasets with 1 obs per combination of variable values (from 1, 2, 3, 4 or more variables) and data on frequencies and/or percentages. The output datasets (or resultssets) may be listed, written to a disk file, or written to memory, overwriting the pre-existing data. The resultsset can be converted to tab-delimited form by the official Stata -outsheet- command, or converted to tab-delimited or ampersand-delimited or HTML or TeX form by -listtex- (also downloadable from SSC).

I hope this helps.

Roger



--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
Division of Asthma, Allergy and Lung Biology
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: roger.newson@kcl.ac.uk
Website: http://phs.kcl.ac.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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index