Statalist


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

st: RE: Kaplan Meier graph in longitudinal data


From   "Kieran McCaul" <[email protected]>
To   <[email protected]>
Subject   st: RE: Kaplan Meier graph in longitudinal data
Date   Wed, 13 May 2009 06:28:44 +0800

..

I don't quite understand the problem here.
The data that you have given us is not multi-event data, at least in the example you provided - there is only one event for id=1 and id=2.
The variable x2 is not an event, it is a time-dependent variable that switches off and on during the course of follow-up.

The -stset- command that you used will produce the following survival-time variables _st, _d, etc.

     +--------------------------------------------------------------------------------+
     | id     d_entry    d_censor   status   age   x2   _st   _d   _origin   _t   _t0 |
     |--------------------------------------------------------------------------------|
  1. |  1   20jan2008   22jan2008        0    62    0     1    0     17551    2     0 |
  2. |  1   22jan2008   24jan2008        0    62    0     1    0     17551    4     2 |
  3. |  1   24jan2008   26jan2008        0    62    1     1    0     17551    6     4 |
  4. |  1   26jan2008   28jan2008        1    62    0     1    1     17551    8     6 |
  5. |  2   13jan2008   18jan2008        0    70    0     1    0     17544    5     0 |
     |--------------------------------------------------------------------------------|
  6. |  2   18jan2008   20jan2008        0    70    1     1    0     17544    7     5 |
  7. |  2   20jan2008   24jan2008        0    70    0     1    0     17544   11     7 |
  8. |  2   24jan2008   26jan2008        1    70    1     1    1     17544   13    11 |
     +--------------------------------------------------------------------------------+

You can run -sts graph- on this and get Kaplan=Meier survival curves.



______________________________________________
Kieran McCaul MPH PhD
WA Centre for Health & Ageing (M573)
University of Western Australia
Level 6, Ainslie House
48 Murray St
Perth 6000
Phone: (08) 9224-2701
Fax: (08) 9224 8009
email: [email protected]
http://myprofile.cos.com/mccaul 
http://www.researcherid.com/rid/B-8751-2008
______________________________________________
Epidemiology is so beautiful and provides such an important perspective on human life and death, 
but an incredible amount of rubbish is published.  Richard Peto (2007) 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Deepa Aggarwal
Sent: Tuesday, 12 May 2009 1:52 AM
To: [email protected]
Subject: st: Kaplan Meier graph in longitudinal data

 Hi All,

I have the following longitudinal data :

 id     d_entry           d_censor         status          age       x2
 1      20jan2008     22jan 2008        0               62          0
 1      22jan 2008    24jan 2008        0               62          0
 1      24jan 2008    26jan 2008        0               62          1
 1      26jan 2008    28jan 2008        1                62          0
 2      13jan 2008    18jan 2008        0               70           0
 2     18jan 2008    20jan 2008        0               70           1
 2      20jan 2008    24jan 2008        0               70           0
 2     24jan 2008    26jan 2008        1                70          1

 Here id is patient id number, d_entry is the date of entry,  d_censor
 is the date of censoring, status is the censoring variable, age is
 fixed for each id, x2 changes with time for each id.

First I stset the above mentioned data by using the following command:
stset d_censor, id(id) failure (status==1) origin (time d_entry)

Now I want to get a Kaplan meier graph . I know if there is one event per
id, then sts graph can be used.
But in recurrent event models, what command should be used?


 Thanks for your consideration.

 Deepa



-- 
Deepa

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