Statalist


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

st: re: Summary stat table


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: re: Summary stat table
Date   Wed, 11 Nov 2009 09:25:50 -0500

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



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