Dear Stata Users,
I want to make a table of summary statistics using -tabstat- command, but the results seems to me a bit disappointing. In the table that generated by -tabstat, by(type)- ( column(variables) as default), the variables are listed in column and their summary statistics are listed in row (listed separately for different types). However, in my writing task, I want another layout style: the variables are listed in row and their summary statistics along with the variable of types are listed in column. In the below I will use the auto.dta to give an example. p.s. The user-written command -publish- (from http://web.uni-corvinus.hu/bartus/stata) gives the results that I desire, however I don't choose to resort to it for certain reasons, its table width problem in Word for example.
I want to make a table of summary statistics using -tabstat- command, but the results seems to me a bit disappointing. In the table that generated by -tabstat, by(type)- ( column(variables) as default), the variables are listed in column and their summary statistics are listed in row (listed separately for different types). However, in my writing task, I want another layout style: the variables are listed in row and their summary statistics along with the variable of types are listed in column. In the below I will use the auto.dta to give an example. p.s. The user-written command -publish- (from http://web.uni-corvinus.hu/bartus/stata) gives the results that I desire, however I don't choose to resort to it for certain reasons, its table width problem in Word for example.
Code:
sysuse auto, clear tabstat price weight rep78, by(foreign) format(%9.0f) /*see Table 1*/ publish open example publish sum price weight rep78, by(foreign) contents(mean) total /*see Table 2*/ publish close
Comment