<>
Martin schreib
" Though it surprises me as to why tabstat is not 'byable' at two levels"
In defence of -tabstat-:
*************
by rep78 foreign, sort: tabstat price mpg headroom, statistics( mean count )
columns(statistics)
*************
or even
clear all
sysuse auto
drop if rep78>3
egen repf = group(rep78 foreign) , label
tabstat price mpg headroom, statistics( mean p50 ) col(stat) by(repf) not save
forv i=1/4 {
mat res=nullmat(res)\r(Stat`i')
}
mat res2 = res'
mat li res2, f(%9.2f)
// outtable from ssc
outtable using res2, mat(res2) f(%9.2f) replace
Kit Baum
[email protected]
*
* 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/