Statalist The Stata Listserver


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

st: tabout function


From   "Urvi Shah" <[email protected]>
To   <[email protected]>
Subject   st: tabout function
Date   Tue, 9 May 2006 10:16:15 +0100

I would like to use the 'tabout' fiunction with dates. My problem is that
the result from the tabout function shows a table with the numerical values
of mrec rather than actual dates. If I use the statement 'tab mrec
site_order_code2', it shows the mrec variable as a month e.g. Jan 2006. How
can I do this using the tabout function. 


1) Part of my code looks something like this:

gen mrec=emrd_dinsert
label var mrec "Month of recruitment"
label val mrec month
format mrec %tmm_cY

label var site_order_code site2
encode site_order_code, generate(site_order_code2)

tabout mrec site_order_code2 if casetype == "Reg_&_Rand" using "abc.xls"



2) Describe mrec shows the following:

. describe mrec

              storage  display     value
variable name   type   format      label      variable label
----------------------------------------------------------------------------
---
mrec            float  %tmm_cY     month      Month of recruitment



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



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