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

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


From   "Nick Winter" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Summarising multiple tabulations in one table
Date   Tue, 10 Dec 2002 09:36:45 -0500

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

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