Use -sts generate- to generate one of the survival curves and you can
then overlay it on the other with -addplot()-, e.g.
/* Set up random st data */
clear
set obs 100
gen int time1=ceil(100*uniform())
gen int time2=ceil(100*uniform())
gen byte fail1=uniform()<.8
gen byte fail2=uniform()<.8
/* Plot survival curves */
stset time2, f(fail2)
sts gen s2=s
stset time1, f(fail1)
sts graph, addplot(line s2 time2, sort c(J) legend(order(1 "Outcome 1" 2
"Outcome 2")))
Hope this helps
David
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Esoult
Hanratty
Sent: 07 March 2006 15:31
To: [email protected]
Subject: st: Overlay survival curves
Hello,
Is there any way within stata to overlay two survival curves. I have two
separate endpoints and I want to compare the survival curve to each
endpoint.
Thanks
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
*
* 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/