Consider the following data from Kalbfleisch and Prentice (1980). Two groups of rats received different pretreatment regimes and then were exposed to a carcinogen. Investigators recorded the survival times of the rats from exposure to mortality from vaginal cancer. Four rats died of other causes, so their survival times are censored. Interest lies in whether the survival curves differ between the two groups. The data set Rats contains the variable Days (the survival time in days), the variable Status (the censoring indicator variable: 0 if censored and 1 if not censored), and the variable Group (the pretreatment group indicator). data Rats; label Days ='Days from Exposure to Death'; input Days Status Group @@; datalines; 143 1 0 164 1 0 188 1 0 188 1 0 190 1 0 192 1 0 206 1 0 209 1 0 213 1 0 216 1 0 220 1 0 227 1 0 230 1 0 234 1 0 246 1 0 265 1 0 304 1 0 216 0 0 244 0 0 142 1 1 156 1 1 163 1 1 198 1 1 205 1 1 232 1 1 232 1 1 233 1 1 233 1 1 233 1 1 233 1 1 239 1 1 240 1 1 261 1 1 280 1 1 280 1 1 296 1 1 296 1 1 323 1 1 204 0 1 344 0 1 ; run; In the MODEL statement, the response variable, Days, is crossed with the censoring variable, Status, with the value that indicates censoring enclosed in parentheses (0). The values of Days are considered censored if the value of Status is 0; otherwise, they are considered event times. proc phreg data=Rats; model Days*Status(0)=Group; run; Results of the PROC PHREG analysis appear in Figure 49.1. Since Group takes only two values, the null hypothesis for no difference between the two groups is identical to the null hypothesis that the regression coefficient for Group is 0. All three tests in the "Testing Global Null Hypothesis: BETA=0" table (see the section "Testing the Global Null Hypothesis") suggest that the survival curves for the two pretreatment groups may not be the same. In this model, the hazards ratio (or risk ratio) for Group, defined as the exponentiation of the regression coefficient for Group, is the ratio of the hazard functions between the two groups. The estimate is 0.551, implying that the hazard function for Group=1 is smaller than that for Group=0. In other words, rats in Group=1 lived longer than those in Group=0. The SAS System 06:19 Thursday, May 25, 2000 3 The PHREG Procedure Model Information Data Set WORK.RATS Dependent Variable Days Days from Exposure to Death Censoring Variable Status Censoring Value(s) 0 Ties Handling BRESLOW Summary of the Number of Event and Censored Values Percent Total Event Censored Censored 40 36 4 10.00 Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Without With Criterion Covariates Covariates -2 LOG L 204.317 201.438 AIC 204.317 203.438 SBC 204.317 205.022 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 2.8784 1 0.0898 Score 3.0001 1 0.0833 Wald 2.9254 1 0.0872 Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio Group 1 -0.59590 0.34840 2.9254 0.0872 0.551 ------------------ LIFETEST output proc lifetest data=kpt11 method=km plots=(s,ls,lls,h,p); time days*censored(1); strata group; run; Example Kalbfleisch & Prentice (1980) p.2 Rat Data 1 11:04 Saturday, May 15, 1993 The LIFETEST Procedure Product-Limit Survival Estimates GROUP = pretrt1 Survival Standard Number Number DAYS Survival Failure Error Failed Left 0.000 1.0000 0 0 0 19 143.000 0.9474 0.0526 0.0512 1 18 164.000 0.8947 0.1053 0.0704 2 17 188.000 . . . 3 16 188.000 0.7895 0.2105 0.0935 4 15 190.000 0.7368 0.2632 0.1010 5 14 192.000 0.6842 0.3158 0.1066 6 13 206.000 0.6316 0.3684 0.1107 7 12 209.000 0.5789 0.4211 0.1133 8 11 213.000 0.5263 0.4737 0.1145 9 10 216.000 0.4737 0.5263 0.1145 10 9 216.000* . . . 10 8 220.000 0.4145 0.5855 0.1145 11 7 227.000 0.3553 0.6447 0.1124 12 6 230.000 0.2961 0.7039 0.1082 13 5 234.000 0.2368 0.7632 0.1015 14 4 244.000* . . . 14 3 246.000 0.1579 0.8421 0.0934 15 2 265.000 0.0789 0.9211 0.0728 16 1 304.000 0 1.0000 0 17 0 * Censored Observation Quantiles 75% 234.000 Mean 218.757 50% 216.000 Standard Error 9.403 25% 190.000 The LIFETEST Procedure Product-Limit Survival Estimates GROUP = pretrt2 Survival Standard Number Number DAYS Survival Failure Error Failed Left 0.000 1.0000 0 0 0 21 142.000 0.9524 0.0476 0.0465 1 20 156.000 0.9048 0.0952 0.0641 2 19 163.000 0.8571 0.1429 0.0764 3 18 198.000 0.8095 0.1905 0.0857 4 17 204.000* . . . 4 16 205.000 0.7589 0.2411 0.0941 5 15 232.000 . . . 6 14 232.000 0.6577 0.3423 0.1053 7 13 233.000 . . . 8 12 233.000 . . . 9 11 233.000 . . . 10 10 233.000 0.4554 0.5446 0.1114 11 9 239.000 0.4048 0.5952 0.1099 12 8 240.000 0.3542 0.6458 0.1072 13 7 261.000 0.3036 0.6964 0.1031 14 6 280.000 . . . 15 5 280.000 0.2024 0.7976 0.0902 16 4 296.000 . . . 17 3 296.000 0.1012 0.8988 0.0678 18 2 323.000 0.0506 0.9494 0.0493 19 1 344.000* . . . 19 0 * Censored Observation Quantiles 75% 280.000 Mean 240.795 50% 233.000 Standard Error 11.206 25% 232.000 NOTE: The last observation was censored so the estimate of the mean is biased. Summary of the Number of Censored and Uncensored Values GROUP Total Failed Censored %Censored pretrt1 19 17 2 10.5263 pretrt2 21 19 2 9.5238 Total 40 36 4 10.0000 The LIFETEST Procedure Survival Function Estimates SDF | | | | | | 1.0 + *----------------------* | | S | *-*P u | B* r | P---P v | B---|-B i | | | v 0.8 + P BB a | | B---B l | PP | | | | D | P-P | i | | B s | P | t 0.6 + | | r | PP | i | | | b | PP | u | P | t | | BB i | PP | o 0.4 + | B n | | | | PPB---B F | | B--B u | P | n | | | c | P-P | t 0.2 + | B-B i | P--P | o | | | n | | B----B | P------P | | | B | | 0.0 + P | | | | | -------+-------+-------+-------+-------+-------+-------+-------+------ 0 50 100 150 200 250 300 350 days from exposure to death DAYS The LIFETEST Procedure Censored Observations Strata B + B B P + P P ------+------+------+------+------+------+------+------+------ 0 50 100 150 200 250 300 350 days from exposure to death DAYS The LIFETEST Procedure -Log(Survival Function) Estimates -LOG SDF | | 3.0 + B | + | + | + | + | + | P + 2.5 + + + | + + | + + | + B | + + | + + N | + + e 2.0 + + + g | + + a | P + t | + + i | + + v | + + e | + B 1.5 + + + L | P + o | + + g | + + | P +B S | + ++ D | + B F 1.0 + P + | + B | P + | + B | P + | P + | P + 0.5 + + + | +P +B | P ++ | P B | ++P+B | +*++ | +++++++++++*+B 0.0 + *+++++++++++ | | ----+-------+-------+-------+-------+-------+-------+-------+---- 0 50 100 150 200 250 300 350 days from exposure to death DAYS The LIFETEST Procedure Log(-Log(Survival Function)) Estimates L(-L(S)) | 1.5 + | | | | +B 1.0 + ++ | P ++ | ++ B | ++ + | P + 0.5 + ++ B | P ++ L | + + o | P +B g | + ++ 0.0 + P B+ N | P +B e | + B g | P + a | P + t -0.5 + + + i | P + v | + + e | +P + | ++ +B L -1.0 + P+ ++ o | + ++ g | P ++ | + B S | P + D -1.5 + + + F | + +B | +++++ | ++++ | B+ + -2.0 + + + | + + | + P | B + | + + -2.5 + +++ | ++ | + | + | P -3.0 + B --+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-- 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 days from exposure to death Log DAYS The LIFETEST Procedure Legend for Strata Symbols P:GROUP=pretrt1 B:GROUP=pretrt2 The LIFETEST Procedure Testing Homogeneity of Survival Curves over Strata Time Variable DAYS Rank Statistics GROUP Log-Rank Wilcoxon pretrt1 4.7625 114.00 pretrt2 -4.7625 -114.00 Covariance Matrix for the Log-Rank Statistics GROUP pretrt1 pretrt2 pretrt1 7.26327 -7.26327 pretrt2 -7.26327 7.26327 Covariance Matrix for the Wilcoxon Statistics GROUP pretrt1 pretrt2 pretrt1 4902.22 -4902.22 pretrt2 -4902.22 4902.22 Test of Equality over Strata Pr > Test Chi-Square DF Chi-Square Log-Rank 3.1227 1 0.0772 Wilcoxon 2.6510 1 0.1035 -2Log(LR) 0.0775 1 0.7807