Chapter Contents |
Previous |
Next |
The LIFETEST Procedure |
You can use the LIFETEST procedure to compute nonparametric estimates of the survivor function and to compute rank tests for association of the response variable with other variables.
For simple analyses, only the PROC LIFETEST and TIME statements are required. Consider a sample of survival data. Suppose that the time variable is t and the censoring variable is c with value 1 indicating censored observations. The following statements compute the product-limit estimate for the sample:
proc lifetest; time t*c(1); run;
You can use the STRATA statement to divide the data into various strata. A separate survivor function is then estimated for each stratum, and tests of the homogeneity of strata are performed. You can specify covariates in the TEST statement. PROC LIFETEST computes linear rank statistics to test the effects of these covariates on survival. For example, consider the results of a small randomized trial on rats. Suppose you assign forty rats exposed to a carcinogen into two treatment groups. The event of interest is death from cancer induced by the carcinogen. The response is the time from randomization to death. Four rats died of other causes; their survival times are regarded as censored observations. Interest lies in whether the survival distributions differ between the two treatments.
The data set Exposed contains four variables: Days (survival time in days from treatment to death), Status (censoring indicator variable: 0 if censored and 1 if not censored), Treatment (treatment indicator), and Sex (gender: F if female and M if male).
data Exposed; input Days Status Treatment Sex $ @@; datalines; 179 1 1 F 378 0 1 M 256 1 1 F 355 1 1 M 262 1 1 M 319 1 1 M 256 1 1 F 256 1 1 M 255 1 1 M 171 1 1 F 224 0 1 F 325 1 1 M 225 1 1 F 325 1 1 M 287 1 1 M 217 1 1 F 319 1 1 M 255 1 1 F 264 1 1 M 256 1 1 F 237 0 2 F 291 1 2 M 156 1 2 F 323 1 2 M 270 1 2 M 253 1 2 M 257 1 2 M 206 1 2 F 242 1 2 M 206 1 2 F 157 1 2 F 237 1 2 M 249 1 2 M 211 1 2 F 180 1 2 F 229 1 2 F 226 1 2 F 234 1 2 F 268 0 2 M 209 1 2 F ;
PROC LIFETEST is invoked to compute the product-limit estimate of the survivor function for each treatment and to compare the survivor functions between the two treatments. In the TIME statement, the survival time variable, Days, is crossed with the censoring variable, Status, with the value 0 indicating censoring. That is, the values of Days are considered censored if the corresponding values of Status are 0; otherwise, they are considered as event times. In the STRATA statement, the variable Treatment is specified, which indicates that the data are to be divided into strata based on the values of Treatment. PROC LIFETEST computes the product-limit estimate for each stratum and tests whether the survivor functions are identical across strata.
symbol1 c=blue; symbol2 c=orange; proc lifetest data=Exposed plots=(s,ls,lls); time Days*Status(0); strata Treatment; run;
The PLOTS= option in the PROC LIFETEST statement is used to
request a plot of the estimated survivor function against
time (by specifying S), a plot of the negative log of the
estimated survivor function against time (by specifying LS),
and a plot of the log of the negative log of the estimated
survivor function against log time (by specifying LLS).
The LS and LLS plots provide an empirical check of
the appropriateness of the exponential model and
the Weibull model, respectively, for the survival
data (Kalbfleisch and Prentice 1980, Chapter 2).
If the exponential model is appropriate, the LS curve should be approximately linear through the origin. If the Weibull model is appropriate, the LLS curve should be approximately linear. Since there are more than one stratum, the LLS plot may also be used to check the proportional hazards model assumption. Under this assumption, the LLS curves should be approximately parallel across strata.
The results of the analysis are displayed in the following figures.
Figure 37.1 displays the product-limit survival estimate for the first stratum (Treatment=1). The figure lists, for each observed time, the survival estimate, failure rate, standard error of the estimate, number of failures, and number of subjects remaining in the study.
Figure 37.2 displays summary statistics of survival times for Treatment=1. It contains estimates of the 25th, 50th, and 75th percentiles and the corresponding 95% confidence limits.
The median survival time for rats in this treatment is 256 days. The mean and standard error are also displayed; however, it is noted that these values are underestimated because the largest observed time is censored and the estimation is restricted to the largest event time.
|
|
Figure 37.3 and Figure 37.4 display the survival estimates and the summary statistics of the survival times for Treatment=2. The median survival time for rats in this treatment is 235 days.
|
A summary of the number of censored and event observations is shown in Figure 37.5. The figure lists, for each stratum, the number of event and censored observations, and the percentage of censored observations.
|
Figure 37.6 displays the graph of the product-limit survivor function estimates versus survival time. The two treatments differ primarily at larger survival times.
Figure 37.7 displays the graph of the log survival function estimates versus survival time for the two treatments. Neither curve approximates a straight line through the origin; therefore, the exponential model is not appropriate for the survival data.
Figure 37.8 displays the graph of the negative log-log survivor function estimates versus log time for the two treatments.
|
Results of the comparison of survival curves between the two treatments are shown in Figure 37.9. The rank tests for homogeneity indicate a significant difference between the treatments (p=0.0175 for the log-rank test and p=0.0249 for the Wilcoxon test). Rats in Treatment=1 live significantly longer than those in Treatment=2. The log-rank test, which places more weight on larger survival times, is more significant than the Wilcoxon test, which places more weight on early survival times. As noted earlier, the exponential model is not appropriate for the given survival data; consequently, the result of the likelihood ratio test should be ignored.
Next, suppose that gender is thought to be related to survival time, and you want to study the treatment effect while adjusting for the gender of the rats. By specifying the variable Sex in the STRATA statement and by specifying the variable Treatment in the TEST statement, you can test the effect of Treatment while adjusting for the effect of Sex. The log-rank and Wilcoxon linear rank statistics are computed by pooling over the strata defined by the values of Sex, thus adjusting for the effect of Sex.
The NOTABLE option is added to the PROC LIFETEST statement to avoid estimating a survival curve for each gender.
proc lifetest data=Exposed notable; time Days*Status(0); strata Sex; test Treatment; run;
Results of the linear rank tests are shown in Figure 37.10. The treatment effect is statistically significant for both the Wilcoxon test (p=0.0147) and the log-rank test (p=0.0075). As compared to the results of the homogenity test in Figure 37.9, the significance of the treatment effect has been sharpened by controlling for the effect of the gender of the subjects.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.