Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Tabout including all categories


From   Elizabeth Knaster <ElizabethK@uihi.org>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   st: Tabout including all categories
Date   Thu, 22 Dec 2011 19:31:02 +0000

Hello! I could use some help with tabout:

I want to use tabout to produce tables with all categories of a variable, even if the value is equal to zero. I have installed fre from SSC and have successfully used includelabeled, for example, "fre agecat, includelabeled" but I am unable to use "includelabeled" with tabout. Is there a way to incorporate fre and includelabeled in the tabout syntax? Or is there some other way to have tabout display all categories of a variable, including zero?  

This is the current code I am using, for reference: 

foreach var0 in sex agecat durdmcat dmtype BMIcat   {
tabout `var0' year using "AllSitesTrends.xls", append mi c(freq col) f(0 3p) clab(N %)  
} 

Thanks, and happy holidays!

Liz

Elizabeth Knaster, MPH
Project Coordinator
Urban Indian Health Institute
Seattle Indian Health Board
Phone: 206-812-3032 
Fax: 206-812-3044 
Email: ElizabethK@uihi.org

Sign up for the UIHI's Weekly Resource E-mail here or subscribe at http://www.uihi.org/. ; The Weekly Resource E-mail is UIHI's primary communication on opportunities for staff development, grant announcements and other relevant public health information.


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index