Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Tailoring stata output for specific requirements


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Tailoring stata output for specific requirements
Date   Tue, 1 Nov 2005 17:14:32 -0000

Your main requirements seem to be customisation
of headings, separators, underlines, etc. The main 
places to look are therefore help on -display-
and -smcl-. Sooner or later you will need to 
know more about -format-. 

Nick 
[email protected] 

David Winter
 
> As a new Stata user with the help of yourselves I have completed my
> survival analysis and now want to output the results in a specific
> format.  I should be most grateful for comments.  I have looked at
> -list- and -summarize- but neither seem to fit my exact requirements.
> 
> Example:  I have the following data, the variables are:
> 
> Sex : Sex of patients
> Ageband : Age at treatment
> OBS: Observed neoplasms
> EXP: Expected neoplasms
> SMR: Standardized Mortality Ratio (OBS/EXP)
> PYears: Person-Time (Years) in analysis
> 
> Sex      AgeBand   OBS   EXP    SMR   PYears
> MALE       0-4      5    0.25   20      6.45
> MALE       5-9      1    0.3    3.33    1.4
> MALE       10-14    3    0.4    7.5     2.6
> FEMALE     0-4      2    0.25   8       3.25
> FEMALE     5-9      6    0.75   8       1.95
> FEMALE     10-14    1    0.1    10      8.25
> 
> Ideally, I should like to display the data above with 
> meaningful labels
> for the data-set and variables, a summary line for each sex 
> and overall
> and line separators as appropriate for example:
> 
> 
> BRAIN TUMOUR ANALYSIS
> =====================
> 
> Sex of           Age at Trt   Observed   Expected    SMR   Person
> Survivor                      Neoplasms  Neoplasms         Years
> ========         ==========   =========  =========   ===   ======
> 
> MALE               0-4           5         0.25      20      6.45
> MALE               5-9           1         0.3       3.33    1.4
> MALE               10-14         3         0.4       7.5     2.6
> ------------------------------------------------------------------
> MALE (All age)                   9         0.95      9.473   10.45
> ------------------------------------------------------------------
> FEMALE             0-4           2         0.25      8       3.25
> FEMALE             5-9           6         0.75      8       1.95
> FEMALE            10-14          1         0.1       10      8.25
> ------------------------------------------------------------------
> FEMALE(All age)                  9         1.1       8.182   13.45
> ------------------------------------------------------------------
> ------------------------------------------------------------------
> OVERALL                          18        2.05      8.78    23.9
> ------------------------------------------------------------------
> 
> The formatted data can be dumped to an ASCII text file.
> 
> I'm sure this is possible.  All suggestions gratefully received.

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