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

st: Tailoring stata output for specific requirements


From   "David Winter" <d.l.winter@bham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Tailoring stata output for specific requirements
Date   Tue, 1 Nov 2005 16:43:35 -0000

Hello Stata-Listers,

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.

With best wishes

Dave

****************************************************
Mr David L. Winter, HNC
I.T. Manager (BCCSS Study)
Department of Public Health & Epidemiology
Room 105, Public Health Building
University of Birmingham
Edgbaston
Birmingham
B15 2TT
UK
tel.: +44 (0)121 414 6766
fax.: +44 (0)121 414 7923
****************************************************


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