Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Multiple Kaplan Meier graphs for PFS and survival


From   moleps islon <[email protected]>
To   [email protected]
Subject   Re: st: Multiple Kaplan Meier graphs for PFS and survival
Date   Tue, 27 Jan 2009 15:14:52 +0100

Thank you.. Worked like a charm, but I needed to create the two groups
in a slightly different fashion for it to work..

Moleps


On Tue, Jan 27, 2009 at 11:38 AM, Ronan Conroy <[email protected]> wrote:
> On 27 Ean 2009, at 10:28, moleps islon wrote:
>
>> Dear statalisters,
>> I need to prepare a combined Kaplan Meier graph incorporating both
>> progression-free survival and overall survival in addition to
>> risktables. Since the event is different I rely on using stset for
>> each instance and then sts graph, however however graph combine
>> refuses to display the two graphs with joint axes (I'm only able to
>> get two graphs side by side).
>
> I suggest you cheat like mad.
>
> 1. Create an id number
> . gen id = _n
> 2. Use -expand 2- to duplicate each observation
> 2. -sort- by id number
> 3. create two groups
> . gen group = mod(id,2)=1
>
> Now you can make your time variable and survival endpoint indicate survival
> for group 0 and progression for group 1
> A -by- in the graph specification will show the two 'groups' separately
>
>
>
> Ronan Conroy
> =================================
>
> [email protected]
> Royal College of Surgeons in Ireland
> Epidemiology Department,
> Beaux Lane House, Dublin 2, Ireland
> +353 (0)1 402 2431
> +353 (0)87 799 97 95
> +353 (0)1 402 2764 (Fax - remember them?)
> http://rcsi.academia.edu/RonanConroy
>
> P    Before printing, think about the environment
>
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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