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

Re: st: Grouped vars with different summary measures in one table

From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: Grouped vars with different summary measures in one table
Date   Mon, 17 Dec 2007 09:20:50 -0500

Gawrich Stefan <[email protected]>:
You might find -tabstatmat- helpful; some users like a marriage of
-tabstatmat- and -xlm_tab- very useful.  Both are available from SSC
and easily acessible via -findit-.  The -collapse- option is a good
one, with the -fast- option, especially after first -preserve-ing your
data, possibly with a -tabdisp- at the end. But my personal favorite
is to calculate results one by one in a -foreach- loop, and use -file-
to write results to a file as I go; see e.g.

On Dec 17, 2007 4:44 AM, Gawrich Stefan <[email protected]> wrote:
> I often have to report different summary measures of different vars by
> group-level in one table. For example I'd like to display the proportion of
> overweight pre-school children (mean of dummy-var var1), the number of cases
> (sum of counting-var var2) and the median score of a test (p50 of var3) by
> city:
> tabstat (one-by-one or with all vars and summary measures specified
> simultaniously) give the results but one needs a lot of copy & paste to a
> spreadsheet to get it in shape. collapse is of course another solution but
> slow with big datasets and certainly a very big transformation just to
> obtain some descriptive statistics.
*   For searches and help try:

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