03-19-2013 02:19 AM
Greetings SAS survivalists!
Here is my issue. Suppose I have a population of subjects who are alive between time T1 and time T2. For each subject I have four pieces of information:
1. ID identifier
2. ENTRY_TIME time the subject enters the population
3. DURATION amount of time the subject spends in the population; for each subject, the largest DURATION can be is (T2 - ENTRY_TIME)
4. EXIT_FLAG binary variable that has a value of 1 if the subject leaves the population before T2, 0 if the subject is still in the population at T2. In other words, EXIT_FLAG = ((ENTRY_TIME + DURATION) le T2);
I can create a Kaplan-Meier graph from T1 to T2 as follows:
PROC LIFETEST DATA = inds (WHERE = (ENTRY_TIME ge T1)) PLOTS = S OUTSURV = outds;
TIME DURATION * EXIT_FLAG(0);
The OUTSURV data set contains the computed empirical survival probabilities. My WHERE condition means that I use only the subjects who enter the population during the time interval in question (T1 to T2). But I may have a large group of subjects with ENTRY_TIME < T1. I'd like to use them to estimate the survival probabilities for durations greater than (T2 - T1). The problem is that including the long-lived subjects who entered the population before T1 will artificially inflate the survival probabilities of the early times, because they're counted as survivors past the early times, but generations who entered and left the population between the births of the long-lived subjects and T1 aren't counted at all. This is the problem of left truncation. Does PROC LIFETEST (or another PROC, if necessary) have a way to produce the correct empirical survival probabilities, taking this into account? Or does it have to be programmed manually?
-- TMK --
03-19-2013 11:02 PM
Thank you for responding! I also posted this query to SAS-L, and someone referred me to a WUSS paper that shows exactly how to do it in PROC PHREG,
The key is to use a MODEL statement with no covariates, e.g. "MODEL duration*censor(0)=;" I didn't see this mentioned in the SAS online doc, or in Paul Allison's nice book about survival analysis on SAS. Unfortunately, I couldn't get PROC PHREG to produce the graph (I never have any success getting graphics with ODS), but I was able to use GPLOT to graph the output file.