Statalist


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

Re: st: Summary Stat Table


From   Roy Wada <roywada@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Summary Stat Table
Date   Wed, 11 Nov 2009 07:36:30 -0800

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



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