Tuesday, March 07, 2006

st: RE: Overlay survival curves

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: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Esoult Hanratty Sent: 07 March 2006 15:31 To: statalist@hsphsun2.harvard.edu 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/


Tag:


Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?