Thank you Svend for suggesting tabstat.
However, it seems that -tabstat- does not allow more than one variable in
the by(varname) option.
-table row col supercol- allows up to 3. Although the by(varlist) prefix
could be used with -tabstat-, it would seem simpler and satisfy the
requirement to produce more compact tables by including sem as an option
in -table-.
Regards, Garry
> Garry wrote:
>
> The table command does not accept se or sem (the standard error of the
> mean) in the contents(clist) option. I think this would be very useful
> because a summary of a variable often includes n mean and sem.
>
> ------------------------------------------
>
> Use -tabstat-; it is quite flexible:
>
> . tabstat price, stat(n mean sem) by(foreign) col(stat)
>
> Summary for variables: price
> by categories of: foreign (Car type)
>
> foreign | N mean se(mean)
> ---------+------------------------------
> Domestic | 52 6072.423 429.4911
> Foreign | 22 6384.682 558.9942
> ---------+------------------------------
> Total | 74 6165.257 342.8719
> ----------------------------------------
>
> Svend
> __________________________________________
>
> Svend Juul
> Institut for Folkesundhed, Afdeling for Epidemiologi
> (Institute of Public Health, Department of Epidemiology)
> Vennelyst Boulevard 6
> DK-8000 Aarhus C, Denmark
> Phone: +45 8942 6090
> Home: +45 8693 7796
> Email: [email protected]
> __________________________________________
>
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/