Programming the statistical procedures from SAS

Survival probabilities (e.g., Kaplan-Meier), left truncation and PROC LIFETEST

Posts: 27

Survival probabilities (e.g., Kaplan-Meier), left truncation and PROC LIFETEST

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:


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

Regular Contributor
Posts: 152

Re: Survival probabilities (e.g., Kaplan-Meier), left truncation and PROC LIFETEST

PROC PHREG allows you to account for left-truncation and to estimate survival probabilities.

Posts: 27

Re: Survival probabilities (e.g., Kaplan-Meier), left truncation and PROC LIFETEST

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.

Ask a Question
Discussion stats
  • 2 replies
  • 2 in conversation