Statalist The Stata Listserver


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

st: combining several Kaplan Meier graphs


From   Michael McCulloch <[email protected]>
To   Statalist <[email protected]>
Subject   st: combining several Kaplan Meier graphs
Date   Thu, 26 Apr 2007 21:01:07 -0700

Dear Statalist members,
I have four separate KM graphs which I'd like to combine into one, arranged in a four-square layout. Any pointers would be greatly appreciated. The syntax is as follows:

sts graph if stage==1, by(tx) ///
title("Survival, stage II NSCLC", box bfcolor(white)) ///
caption("tx=0: Did not use therapy; tx=1: used therapy") ///
lpattern(-) xtitle("Survival time in months") l2title("Percent surviving") xmtick(0(10)150)

sts graph if stage==3, by(tx) ///
title("Survival, stage II NSCLC", box bfcolor(white)) ///
caption("tx=0: Did not use therapy; tx=1: used therapy") ///
lpattern(-) xtitle("Survival time in months") l2title("Percent surviving") xmtick(0(10)150)

sts graph if stage==4, by(tx) ///
title("Survival, stage IIIB NSCLC", box bfcolor(white)) ///
caption("tx=0: Did not use therapy; tx=1: used therapy") ///
lpattern(-) xtitle("Survival time in months") l2title("Percent surviving") xmtick(0(10)150)

sts graph if stage==5, by(tx) ///
title("Survival, stage IV NSCLC", box bfcolor(white)) ///
caption("tx=0: Did not use therapy; tx=1: used therapy") ///
lpattern(-) xtitle("Survival time in months") l2title("Percent surviving") xmtick(0(10)150)
*
* 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