Statalist The Stata Listserver


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

RE: st: RE: Overlay survival curves


From   "Esoult Hanratty" <eosulhan@hotmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: RE: Overlay survival curves
Date   Tue, 07 Mar 2006 16:29:12 +0000

That worked a treat, thanks a million.


From: "David Harrison" <david.harrison@icnarc.org>
Reply-To: statalist@hsphsun2.harvard.edu
To: <statalist@hsphsun2.harvard.edu>
Subject: st: RE: Overlay survival curves
Date: Tue, 7 Mar 2006 15:51:38 -0000

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/
_________________________________________________________________
MSN Toolbar now comes with Windows Desktop Search - FREE download! http://desktop.msn.ie/

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