[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: table of study population characteristics

From   David Airey <david.airey@Vanderbilt.Edu>
Subject   Re: st: table of study population characteristics
Date   Tue, 13 Nov 2007 12:44:43 -0600


search table percentages, all

gives programs that might help like tabout, tablecol, tab2way, tab3way, ...


On Nov 13, 2007, at 12:15 PM, Michael McCulloch wrote:

Dear Statalist members,
I'd like to make a table which tabulates the following study population characteristics:
group (1 or 2)
sex (% female)
age (median)
treated (% yes)
I've studied -tabstat- and -statsmat-, but don't see a capability of tabulating %.

Additionally, I'd like to know whether the following -tabstat- command can be modified to display the sub-headings of price weight on the line below FOREIGN:

sysuse auto, clear
gen weightclass=0
replace weightclass=1 if weight>3000
lab var weightclass Weight
lab def label_weightclass 0 Light 1 Heavy, modify
lab val weightclass label_weightclass
tab weightclass

tabstat price, by(foreign)
sort weightclass
by weightclass: tabstat price weight, stats(count mean median min max) ///
by(foreign) columns(statistics) nototal

Thank you,

Michael McCulloch
Pine Street Foundation
124 Pine St., San Anselmo, CA 94960-2674
Tel: (415) 407-1357
Fax: (415) 485-1065
* For searches and help try:
David C. Airey, Ph.D.
Pharmacology Research Assistant Professor
Center for Human Genetics Research Member

Department of Pharmacology
School of Medicine
Vanderbilt University
Rm 8158A Bldg MR3
465 21st Avenue South
Nashville, TN 37232-8548

TEL   (615) 936-1510
FAX   (615) 936-3747

*   For searches and help try:

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