[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: st: Summary Stat Table

From   "Martin Weiss" <>
To   <>
Subject   AW: st: Summary Stat Table
Date   Wed, 11 Nov 2009 16:48:26 +0100


Two notions of "byability" are being mixed up in this thread: One is the -by
:- prefix ([D], p. 21) that is allowed with most Stata commands. The other
one is more like the -over()- option allowed with commands like -mean-. 

-tabstat- allows both, with the former one being able to handle a -varlist-
with more than one member, as shown in my earlier example, and the latter
(also called -by()- in -help tabstat-) being able to take only a single


-----Ursprüngliche Nachricht-----
[] Im Auftrag von Roy Wada
Gesendet: Mittwoch, 11. November 2009 16:37
Betreff: Re: st: Summary Stat Table

> Though it surprises me as to why tabstat is not 'byable' at two levels
> while something like -collapse- is.

I actually don't use -tabstat- and cannot use it without looking it up.

What I meant was that -outreg2- itself is -byable- in the following way:

sysuse auto, clear
gen white=cond(uniform()>.5,1,0)
gen black=cond(white==1,0,1)
gen male=cond(uniform()>.5,1,0)
gen female=cond(male==1,0,1)

egen group=group(black female)
bys male black: outreg2 using myfile, sum(log) eqkeep(mean N) /*
*/ drop(white female male black) excel replace

*   For searches and help try:

*   For searches and help try:

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