<>
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
-varname-...
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Roy Wada
Gesendet: Mittwoch, 11. November 2009 16:37
An: [email protected]
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
Roy
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/