Statalist The Stata Listserver


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

st: RE: Life Tables for Survival Analysis


From   "Scott Merryman" <smerryman@kc.rr.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Life Tables for Survival Analysis
Date   Mon, 13 Mar 2006 08:34:35 -0600

One way would be to save the life table and then use -twoway connect- with
the line patterns you want.

For example:

tempfile rats
use http://www.stata-press.com/data/r9/rat.dta,clear
ltable t d, by(gr) over saving(`rats')  notable
use `rats',clear
twoway connect sur t1 if gr == 1 , lc(gs1) lp(dash) mcolor(gs1) /// 
|| conn sur t1 if gr == 2, lc(gs12)  mcolor(gs12)

Scott


> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Donna Joseph
> Sent: Monday, March 13, 2006 6:13 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Life Tables for Survival Analysis
> 
> Dear All
> 
> I am new to Stata.  I am using Stata 9 to try to draw a Life Table graph
> for
> a variable with 6 categories. The 6 slopes on the graph are shown by
> different, smooth, coloured lines which is great but I am not printing in
> colour.
> 
> I have tried the symbol command so that each line will be identified by a
> different symbol (i.e. dash, dot, long dash and dot etc).  However only
> the
> first symbol is recognised when I run the graph so I either have all lines
> with a dash, or all lines with a dot for all six categories.



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