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

Re: RE: st: RE: Summarising multiple tabulations in one table


From   "Stephen P. Jenkins" <[email protected]>
To   [email protected]
Subject   Re: RE: st: RE: Summarising multiple tabulations in one table
Date   Tue, 10 Dec 2002 15:46:09 +0000 (GMT Standard Time)

On Tue, 10 Dec 2002 09:36:45 -0500 Nick Winter 
<[email protected]> wrote:

> <snip>
> >  
> > > I guess your main way forward is -reshape- so that
> > > the agekst* are all stacked into one variable.
> > 
> > I don't see this -- could you elaborate please? The obs in 
> > the data set 
> > are several thousand woman, i.e. unit record data, so what I 
> > was asking 
> > about was a combined tabulation&formatting routine. Tabulation to 
> > derive percentages in each category for each variable is 
> > straightforward, but the formatting like the SPSS example is the 
> > problem. (If each variable of interest were binary, I think I could  
> > solve the problem using -table- or -collapse-, but there are multiple 
> > categories per variable here.)  I am not sure my telling you that the 
> > names were agekst* helped -- a neat solution would allow any variable 
> > names across the top of the report table.
> > 
> > Stephen
> 
> 	. generate i=_n
> 	. reshape long agekst , i(i)
> 	. tab agekst _j , col
> 
> This only works when the variables all have a commong name.  THere might
> be a program out there that does this for more general varlists; or
> perhaps someone will write one.

Great, thanks! I'll follow this up.  [I work in an institute where I am 
on record as telling my increasingly few SPSS-user colleagues that I 
could do anything in Stata that they can do in SPSS, so need to save 
face!] I was about to start doing something starting from -fulltab- 
(from SSC), but this seems much easier.  
Thanks, too, to Lee Sieswerda for his suggestion.  And I agree with 
Nick Cox's point that it that "it would be desirable to be able to do 
this in Stata without restructuring". 

Stephen
----------------------
Professor Stephen P. Jenkins <[email protected]>
Institute for Social and Economic Research (ISER)
University of Essex, Colchester, CO4 3SQ, UK
Tel: +44 (0)1206 873374. Fax: +44 (0)1206 873151.
http://www.iser.essex.ac.uk

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