# RE: st: Table display

 From Fred Wolfe To statalist@hsphsun2.harvard.edu Subject RE: st: Table display Date Fri, 15 Apr 2005 15:33:42 -0500

The fsum program available (ssc install fsum) does something like this. The values happen to be 0 and 1, but will work with any level of category

. fsum age sex

Variable | N Mean SD Min Max
--------------+---------------------------------------------
Age (years) | 89597 62.59 12.82 16.55 103.27
Sex (% male) | 89597 20.89

. tabl sex

sex (Patient's gender) code | Freq Percent
---------------------------------+--------------------
Female 0 | 70881 79.11
Male 1 | 18716 20.89
---------------------------------+--------------------
Total | 89597 100.00

. fsum age sex,catvar(sex)

Variable | N Mean SD Min Max
--------------+---------------------------------------------
Age (years) | 89597 62.59 12.82 16.55 103.27
Sex (% male) | 89597 20.89
Female (%) | 70881 79.11
Male (%) | 18716 20.89

At 03:26 PM 4/15/2005, you wrote:

```Clint,

Close.  All of the variables are dummies so I would like to get a
summary table that includes the counts for each 0 and 1.  Still
digging....

Thanks.

Carter

-----Original Message-----
From: cthompson@econometricainc.com
[mailto:cthompson@econometricainc.com]
Sent: Friday, April 15, 2005 2:22 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: Table display

-tabstat- may get you what you want...for example,

tabstat disproc contacts osex vsex violrc relrc weaprc injrc, stat(mean
sd min max n)
col(stat)

hope this helps, clint

On 15 Apr 2005 at 14:10, Carter Ivan Rees wrote:

> Is there any way to make the following summarize table display the
> number of observations next to my min max values?
>
> summarize disporc contacts osex vsex violrc relrc weaprc injrc,
> separator(2)
>
>     Variable |       Obs        Mean    Std. Dev.       Min        Max
> -------------+--------------------------------------------------------
>      disporc |     12511    .5542323      .49707          0          1
>     contacts |     12511    .0877628    .2829609          0          1
> -------------+--------------------------------------------------------
>         osex |     12511    .7273599    .4453351          0          1
>         vsex |     12511    .3035729    .4598187          0          1
> -------------+--------------------------------------------------------
>       violrc |     12511    .9744225    .1578774          0          1
>        relrc |     12511     .697706    .4592703          0          1
> -------------+--------------------------------------------------------
>       weaprc |     12511    .0683399    .2523383          0          1
>        injrc |     12511    .4987611    .5000184          0          1
>
>
> Thanks to all.
>
> Carter
>
>
> *
> *   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/

Clinton J. Thompson
Econometrica, Inc.
4416 East-West Highway, Suite 215
Bethesda, MD  20814
Phone: 240-333-4803
Fax: 301-657-3140
www.EconometricaInc.com

The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of, or taking of any action
in reliance upon, this information by persons or entities
other than the intended recipient is prohibited. If you
delete the material from any computer.

*
*   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/
```
```
Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel (316) 263-2125     Fax (316) 263-0761
fwolfe@arthritis-research.org

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