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

st: setting up survival data


From   Alexander Tsai <[email protected]>
To   [email protected]
Subject   st: setting up survival data
Date   Tue, 25 Nov 2003 11:47:59 -0500

Dear Statalisters,

I have data on patients, readmissions, and deaths:

. list ptid doadmit doreadm dod

       +----------------------------------------------------+
       |       ptid       doadmit     doreadm           dod |
       |----------------------------------------------------|
    1. |   00000125   29 Aug 1996   14 Nov 96   20 Oct 1997 |
    2. |   00000133   20 Jul 1991           .             . |
    3. |   00000491   21 Mar 1997           .   26 Jun 1999 |
    4. |   00000865   06 Mar 1996           .             . |
    5. |   00000932   13 May 1997   11 Jul 97             . |
       |----------------------------------------------------|
    6. |   00001354   04 Jun 1994           .             . |
    7. |   00001610   10 May 1995           .             . |
    8. |   00001804   24 Sep 1996           .   12 Jul 1997 |
    9. |     000020   20 Aug 1992           .   09 Sep 1993 |
   10. |     000025   28 Oct 1996           .   24 Aug 1999 |
       |----------------------------------------------------|
   11. |     000034   20 Nov 1992   07 Jan 93             . |
					...

I want to examine readmissions only up to 90 days post-discharge, so I
create an extra variable, 'dolast':

	generate dolast=dodischg+90
	format dolast %dD_m_CY

But all of the observations with doreadm==. are, obviously, missing. So
when I -stset- my data, I obtain the following results:

. stset doreadm, id(ptid) time0(doadmit) origin(time doadmit)
failure(event) exit(event==2 time dolast)

                id:  ptid
     failure event:  event != 0 & event < .
obs. time interval:  (doadmit, doreadm]
 exit on or before:  event==2 time dolast
    t for analysis:  (time-origin)
            origin:  time doadmit

------------------------------------------------------------------------
------
    23324  total obs.
    18608  event time missing (doreadm>=.)                      PROBABLE
ERROR
------------------------------------------------------------------------
------
     4716  obs. remaining, representing
     4716  subjects
     4716  failures in single failure-per-subject data
   184319  total analysis time at risk, at risk from t =         0
                             earliest observed entry t =         0
                                  last observed exit t =        90

What I would like to do is:

a) I would like to remove patients from the study if they die within 90
days post discharge. But I can't have two time variables in the exit
option -- for example, (exit time dod dolast). So what I did is set
event==2 for death (event==1 for readmission).

b) How do I keep the patients with no readmission in the study? I
thought about replacing doreadm=dolast if doreadm==. but that doesn't
seem right.

Cleves/Gould/Gutierrez' book "An Introduction to Survival Analysis Using
Stata" has been exceedingly helpful, but I am stuck here. I'd be
grateful for any help.

Thanks,
Alex



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