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

RE: st: Survival functions on one graph...


From   Maarten buis <[email protected]>
To   [email protected]
Subject   RE: st: Survival functions on one graph...
Date   Tue, 27 Dec 2005 17:04:57 +0000 (GMT)

This example should get you started

*-------------begin example--------------
sysuse cancer, clear
stset studytim, failure(died)
sts gen surv = s, by(drug)
sts gen survtot =s
twoway (line surv _t if drug==1, connect(J)) /*
   */  (line surv _t if drug==2, connect(J)) /*
   */  (line surv _t if drug==3, connect(J)) /*
   */  (line survtot _t, sort connect(J))
*-------------end example-----------------

HTH,
Maarten


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting adress:
Buitenveldertselaan 3 (Metropolitan), room Z214

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------

[email protected] wrote:
> How does one combine an overall survival function  graph with a 
> graph showing survival functions for 2 treatment groups?


		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
*
*   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