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

st: RE: Kaplan Meier graph


From   "David Harrison" <[email protected]>
To   <[email protected]>
Subject   st: RE: Kaplan Meier graph
Date   Tue, 5 Jul 2005 08:39:24 +0100

I don't think there is any direct way to do this in -sts graph-, but you can generate the survivor function, set up your own labels first and then add them onto -sts graph- with the -plot()- option. Something like this...

sysuse cancer, clear
stset studytime, f(died)
sts gen surv=s
local addplot "plot(scatteri"
forvalues x = 10(10)30 {
	summ surv if studytime < `x', meanonly
	local y = r(min)
	local l = string(`y',"%5.3f")
	local addplot `"`addplot' `y' `x' "`l'""'
}
local addplot `"`addplot', ms(i) mlabp(12))"'
sts graph, `addplot' legend(off)

Hope this helps

David

-----Original Message-----
From: Patricia Vera Rojas [mailto:[email protected]]
Sent: 04 July 2005 17:28
To: [email protected]
Subject: st: Kaplan Meier graph


Hi all,

I want to see the K-M graph with the y-axis values at some
points in the survival function. For instance, see the
exact y-values of the Survival function at X-axis values
like 10, 20, 30 days. I need these values be showed in the
graph, near the line of the survival function. 
How can I do it?
Thanks,
Patricia


		
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, m�s seguridad 
http://correo.yahoo.es
*
*   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/



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