Krall, Uthoff, and Harley (1975) analyzed data from a study on multiple myeloma in which researchers treated 65 patients with alkylating agents . Of those patients , 48 died during the study and 17 survived. In the data set Myeloma , the variable Time represents the survival time in months from diagnosis. The variable VStatus consists of two values, 0 and 1, indicating whether the patient was alive or dead, respectively, at the end of the study. If the value of VStatus is 0, the corresponding value of Time is censored. The variables thought to be related to survival are LogBUN (log(BUN) at diagnosis), HGB (hemoglobin at diagnosis), Platelet (platelets at diagnosis: 0=ab-normal, 1=normal), Age (age at diagnosis in years ), LogWBC (log(WBC) at diagnosis), Frac (fractures at diagnosis: 0=none, 1=present), LogPBM (log percentage of plasma cells in bone marrow), Protein (proteinuria at diagnosis), and SCalc (serum calcium at diagnosis). Interest lies in identifying important prognostic factors from these nine explanatory variables.
data Myeloma; input Time VStatus LogBUN HGB Platelet Age LogWBC Frac LogPBM Protein SCalc; label Time='Survival Time' VStatus='0=Alive 1=Dead'; datalines; 1.25 1 2.2175 9.4 1 67 3.6628 1 1.9542 12 10 1.25 1 1.9395 12.0 1 38 3.9868 1 1.9542 20 18 2.00 1 1.5185 9.8 1 81 3.8751 1 2.0000 2 15 2.00 1 1.7482 11.3 0 75 3.8062 1 1.2553 0 12 2.00 1 1.3010 5.1 0 57 3.7243 1 2.0000 3 9 3.00 1 1.5441 6.7 1 46 4.4757 0 1.9345 12 10 5.00 1 2.2355 10.1 1 50 4.9542 1 1.6628 4 9 5.00 1 1.6812 6.5 1 74 3.7324 0 1.7324 5 9 6.00 1 1.3617 9.0 1 77 3.5441 0 1.4624 1 8 6.00 1 2.1139 10.2 0 70 3.5441 1 1.3617 1 8 6.00 1 1.1139 9.7 1 60 3.5185 1 1.3979 0 10 6.00 1 1.4150 10.4 1 67 3.9294 1 1.6902 0 8 7.00 1 1.9777 9.5 1 48 3.3617 1 1.5682 5 10 7.00 1 1.0414 5.1 0 61 3.7324 1 2.0000 1 10 7.00 1 1.1761 11.4 1 53 3.7243 1 1.5185 1 13 9.00 1 1.7243 8.2 1 55 3.7993 1 1.7404 0 12 11.00 1 1.1139 14.0 1 61 3.8808 1 1.2788 0 10 11.00 1 1.2304 12.0 1 43 3.7709 1 1.1761 1 9 11.00 1 1.3010 13.2 1 65 3.7993 1 1.8195 1 10 11.00 1 1.5682 7.5 1 70 3.8865 0 1.6721 0 12 11.00 1 1.0792 9.6 1 51 3.5051 1 1.9031 0 9 13.00 1 0.7782 5.5 0 60 3.5798 1 1.3979 2 10 14.00 1 1.3979 14.6 1 66 3.7243 1 1.2553 2 10 15.00 1 1.6021 10.6 1 70 3.6902 1 1.4314 0 11 16.00 1 1.3424 9.0 1 48 3.9345 1 2.0000 0 10 16.00 1 1.3222 8.8 1 62 3.6990 1 0.6990 17 10 17.00 1 1.2304 10.0 1 53 3.8808 1 1.4472 4 9 17.00 1 1.5911 11.2 1 68 3.4314 0 1.6128 1 10 18.00 1 1.4472 7.5 1 65 3.5682 0 0.9031 7 8 19.00 1 1.0792 14.4 1 51 3.9191 1 2.0000 6 15 19.00 1 1.2553 7.5 0 60 3.7924 1 1.9294 5 9 24.00 1 1.3010 14.6 1 56 4.0899 1 0.4771 0 9 25.00 1 1.0000 12.4 1 67 3.8195 1 1.6435 0 10 26.00 1 1.2304 11.2 1 49 3.6021 1 2.0000 27 11 32.00 1 1.3222 10.6 1 46 3.6990 1 1.6335 1 9 35.00 1 1.1139 7.0 0 48 3.6532 1 1.1761 4 10 37.00 1 1.6021 11.0 1 63 3.9542 0 1.2041 7 9 41.00 1 1.0000 10.2 1 69 3.4771 1 1.4771 6 10 41.00 1 1.1461 5.0 1 70 3.5185 1 1.3424 0 9 51.00 1 1.5682 7.7 0 74 3.4150 1 1.0414 4 13 52.00 1 1.0000 10.1 1 60 3.8573 1 1.6532 4 10 54.00 1 1.2553 9.0 1 49 3.7243 1 1.6990 2 10 58.00 1 1.2041 12.1 1 42 3.6990 1 1.5798 22 10 66.00 1 1.4472 6.6 1 59 3.7853 1 1.8195 0 9 67.00 1 1.3222 12.8 1 52 3.6435 1 1.0414 1 10 88.00 1 1.1761 10.6 1 47 3.5563 0 1.7559 21 9 89.00 1 1.3222 14.0 1 63 3.6532 1 1.6232 1 9 92.00 1 1.4314 11.0 1 58 4.0755 1 1.4150 4 11 4.00 0 1.9542 10.2 1 59 4.0453 0 0.7782 12 10 4.00 0 1.9243 10.0 1 49 3.9590 0 1.6232 0 13 7.00 0 1.1139 12.4 1 48 3.7993 1 1.8573 0 10 7.00 0 1.5315 10.2 1 81 3.5911 0 1.8808 0 11 8.00 0 1.0792 9.9 1 57 3.8325 1 1.6532 0 8 12.00 0 1.1461 11.6 1 46 3.6435 0 1.1461 0 7 11.00 0 1.6128 14.0 1 60 3.7324 1 1.8451 3 9 12.00 0 1.3979 8.8 1 66 3.8388 1 1.3617 0 9 13.00 0 1.6628 4.9 0 71 3.6435 0 1.7924 0 9 16.00 0 1.1461 13.0 1 55 3.8573 0 0.9031 0 9 19.00 0 1.3222 13.0 1 59 3.7709 1 2.0000 1 10 19.00 0 1.3222 10.8 1 69 3.8808 1 1.5185 0 10 28.00 0 1.2304 7.3 1 82 3.7482 1 1.6721 0 9 41.00 0 1.7559 12.8 1 72 3.7243 1 1.4472 1 9 53.00 0 1.1139 12.0 1 66 3.6128 1 2.0000 1 11 57.00 0 1.2553 12.5 1 66 3.9685 0 1.9542 0 11 77.00 0 1.0792 14.0 1 60 3.6812 0 0.9542 0 12 ;
The stepwise selection process consists of a series of alternating step-up and step-down phases. The former adds variables to the model, while the latter removes variables from the model.
Stepwise regression analysis is requested by specifying the SELECTION=STEPWISE option in the MODEL statement. The option SLENTRY=0.25 specifies that a variable has to be significant at the 0.25 level before it can be entered into the model, while the option SLSTAY=0.15 specifies that a variable in the model has to be significant at the 0.15 level for it to remain in the model. The DETAILS option requests detailed results for the variable selection process.
proc phreg data=Myeloma; model Time*VStatus(0)=LogBUN HGB Platelet Age LogWBC Frac LogPBM Protein SCalc / selection=stepwise slentry=0.25 slstay=0.15 details; run;
Results of the stepwise regression analysis are displayed in Output 54.1.1 through Output 54.1.7.
The PHREG Procedure Model Information Data Set WORK.MYELOMA Dependent Variable Time Survival Time Censoring Variable VStatus 0=Alive 1=Dead Censoring Value(s) 0 Ties Handling BRESLOW Summary of the Number of Event and Censored Values Percent Total Event Censored Censored 65 48 17 26.15 Analysis of Variables Not in the Model Score Variable Chi-Square Pr > ChiSq LogBUN 8.5164 0.0035 HGB 5.0664 0.0244 Platelet 3.1816 0.0745 Age 0.0183 0.8924 LogWBC 0.5658 0.4519 Frac 0.9151 0.3388 LogPBM 0.5846 0.4445 Protein 0.1466 0.7018 SCalc 1.1109 0.2919 Residual Chi-Square Test Chi-Square DF Pr > ChiSq 18.4550 9 0.0302
Individual score tests are used to determine which of the nine explanatory variables is first selected into the model. In this case, the score test for each variable is the global score test for the model containing that variable as the only explanatory variable. The chi-square statistic is compared to a chi-square distribution with one degree of freedom. Output 54.1.1 displays the chi-square statistics and the corresponding p -values. The variable LogBUN has the largest chi-square value (8.5164), and it is significant ( p =0 . 0035) at the SLENTRY=0.25 level. The variable LogBUN is thus entered into the model. Output 54.1.2 displays the model results. Since the Wald chi-square statistic is significant ( p =0 . 0039) at the SLSTAY=0.15 level, LogBUN stays in the model.
Step 1. Variable LogBUN is entered. The model contains the following explanatory variables: LogBUN Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Without With Criterion Covariates Covariates 2 LOG L 309.716 301.959 AIC 309.716 303.959 SBC 309.716 305.830 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 7.7572 1 0.0053 Score 8.5164 1 0.0035 Wald 8.3392 1 0.0039 Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio LogBUN 1 1.74595 0.60460 8.3392 0.0039 5.731
Analysis of Variables Not in the Model Score Variable Chi-Square Pr > ChiSq HGB 4.3468 0.0371 Platelet 2.0183 0.1554 Age 0.7159 0.3975 LogWBC 0.0704 0.7908 Frac 1.0354 0.3089 LogPBM 1.0334 0.3094 Protein 0.5214 0.4703 SCalc 1.4150 0.2342 Residual Chi-Square Test Chi-Square DF Pr > ChiSq 9.3164 8 0.3163
Step 2. Variable HGB is entered. The model contains the following explanatory variables: LogBUN HGB Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Without With Criterion Covariates Covariates -2 LOG L 309.716 297.767 AIC 309.716 301.767 SBC 309.716 305.509 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 11.9493 2 0.0025 Score 12.7252 2 0.0017 Wald 12.1900 2 0.0023 Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio LogBUN 1 1.67440 0.61209 7.4833 0.0062 5.336 HGB 1 -0.11899 0.05751 4.2811 0.0385 0.888
The next step consists of selecting another variable to add to the model. Output 54.1.3 displays the chi-square statistics and p -values of individual score tests (adjusted for LogBUN ) for the remaining eight variables. The score chi-square for a given variable is the value of the likelihood score test for testing the significance of the variable in the presence of LogBUN . The variable HGB is selected because it has the highest chi-square value (4.3468), and it is significant ( p =0 . 0371) at the SLENTRY=0.25 level. Output 54.1.4 displays the fitted model containing both LogBUN and HGB . Based on the Wald statistics, neither LogBUN nor HGB is removed from the model.
Step 3. Variable SCalc is entered. The model contains the following explanatory variables: LogBUN HGB SCalc Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Without With Criterion Covariates Covariates 2 LOG L 309.716 296.078 AIC 309.716 302.078 SBC 309.716 307.692 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 13.6377 3 0.0034 Score 15.3053 3 0.0016 Wald 14.4542 3 0.0023 Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio LogBUN 1 1.63593 0.62359 6.8822 0.0087 5.134 HGB 1 0.12643 0.05868 4.6419 0.0312 0.881 SCalc 1 0.13286 0.09868 1.8127 0.1782 1.142
Output 54.1.5 shows Step 3 of the selection process, in which the variable SCalc is added, resulting in the model with LogBUN , HGB , and SCalc as the explanatory variables. Note that SCalc has the smallest Wald chi-square statistic, and it is not significant ( p =0 . 1782) at the SLSTAY=0.15 level. The variable SCalc is then removed from the model in a step-down phase in Step 4 (Output 54.1.6). The removal of SCalc brings the stepwise selection process to a stop in order to avoid repeatedly entering and removing the same variable.
Step 4. Variable SCalc is removed. The model contains the following explanatory variables: LogBUN HGB Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Without With Criterion Covariates Covariates 2 LOG L 309.716 297.767 AIC 309.716 301.767 SBC 309.716 305.509 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 11.9493 2 0.0025 Score 12.7252 2 0.0017 Wald 12.1900 2 0.0023 Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio LogBUN 1 1.67440 0.61209 7.4833 0.0062 5.336 HGB 1 0.11899 0.05751 4.2811 0.0385 0.888 NOTE: Model building terminates because the variable to be entered is the variable that was removed in the last step.
The procedure also displays a summary table of the steps in the stepwise selection process, as shown in Output 54.1.7.
Summary of Stepwise Selection Variable Number Score Wald Step Entered Removed In Chi-Square Chi-Square Pr > ChiSq 1 LogBUN 1 8.5164 . 0.0035 2 HGB 2 4.3468 . 0.0371 3 SCalc 3 1.8225 . 0.1770 4 SCalc 2 . 1.8127 0.1782
The stepwise selection process results in a model with two explanatory variables, LogBUN and HGB .
An alternative to stepwise selection of variables is best subset selection. The procedure uses the branch and bound algorithm of Furnival and Wilson (1974) to find a specified number of best models containing one, two, three variables, and so on, up to the single model containing all of the explanatory variables. The criterion used to determine best is based on the global score chi-square statistic. For two models A and B, each having the same number of explanatory variables, model A is considered to be better than model B if the global score chi-square statistic for A exceeds that for B.
Best subset selection analysis is requested by specifying the SELECTION=SCORE option in the MODEL statement. The BEST=3 option requests the procedure to identify only the three best models for each size . In other words, PROC PHREG will list the three models having the highest score statistics of all the models possible for a given number of covariates.
proc phreg data=Myeloma; model Time*VStatus(0)=LogBUN HGB Platelet Age LogWBC Frac LogPBM Protein SCalc / selection=score best=3; run;
Output 54.2.1 displays the results of this analysis. The number of explanatory variables in the model is given in the first column, and the names of the variables are listed on the right. The models are listed in descending order of their score chi-square values within each model size. For example, among all models containing two explanatory variables, the model that contains the variables LogBUN and HGB has the largest score value (12.7252), the model that contains the variables LogBUN and Platelet has the second largest score value (11.1842), and the model that contains the variables LogBUN and SCalc has the third largest score value (9.9962).
The PHREG Procedure Regression Models Selected by Score Criterion Number of Score Variables Chi-Square Variables Included in Model 1 8.5164 LogBUN 1 5.0664 HGB 1 3.1816 Platelet 2 12.7252 LogBUN HGB 2 11.1842 LogBUN Platelet 2 9.9962 LogBUN SCalc 3 15.3053 LogBUN HGB SCalc 3 13.9911 LogBUN HGB Age 3 13.5788 LogBUN HGB Frac 4 16.9873 LogBUN HGB Age SCalc 4 16.0457 LogBUN HGB Frac SCalc 4 15.7619 LogBUN HGB LogPBM SCalc 5 17.6291 LogBUN HGB Age Frac SCalc 5 17.3519 LogBUN HGB Age LogPBM SCalc 5 17.1922 LogBUN HGB Age LogWBC SCalc 6 17.9120 LogBUN HGB Age Frac LogPBM SCalc 6 17.7947 LogBUN HGB Age LogWBC Frac SCalc 6 17.7744 LogBUN HGB Platelet Age Frac SCalc 7 18.1517 LogBUN HGB Platelet Age Frac LogPBM SCalc 7 18.0568 LogBUN HGB Age LogWBC Frac LogPBM SCalc 7 18.0223 LogBUN HGB Platelet Age LogWBC Frac SCalc 8 18.3925 LogBUN HGB Platelet Age LogWBC Frac LogPBM SCalc 8 18.1636 LogBUN HGB Platelet Age Frac LogPBM Protein SCalc 8 18.1309 LogBUN HGB Platelet Age LogWBC Frac Protein SCalc 9 18.4550 LogBUN HGB Platelet Age LogWBC Frac LogPBM Protein SCalc
Conditional logistic regression is used to investigate the relationship between an outcome and a set of prognostic factors in matched case-control studies. The outcome is whether the subject is a case or a control. If there is only one case and one control, the matching is 1:1. The m:n matching refers to the situation in which there is a varying number of cases and controls in the matched sets. You can perform conditional logistic regression with the PHREG procedure by using the discrete logistic model and forming a stratum for each matched set. In addition, you need to create dummy survival times so that all the cases in a matched set have the same event time value, and the corresponding controls are censored at later times.
Consider the following set of low infant birth-weight data extracted from Appendix 1 of Hosmer and Lemeshow (1989). These data represent 189 women, of whom 59 had low birth-weight babies and 130 had normal weight babies. Under investigation are the following risk factors: weight in pounds at the last menstrual period ( LWT ), presence of hypertension ( HT ), smoking status during pregnancy ( Smoke ), and presence of uterine irritability ( UI ). For HT , Smoke , and UI , a value of 1 indicates a yes and a value of 0 indicates a no. The woman s age ( Age ) is used as the matching variable. The SAS data set LBW contains a subset of the data corresponding to women between the ages of 16 and 32.
data LBW; input id Age Low LWT Smoke HT UI @@; Time=2-Low; datalines; 25 16 1 130 0 0 0 143 16 0 110 0 0 0 166 16 0 112 0 0 0 167 16 0 135 1 0 0 189 16 0 135 1 0 0 206 16 0 170 0 0 0 216 16 0 95 0 0 0 37 17 1 130 1 0 1 45 17 1 110 1 0 0 68 17 1 120 1 0 0 71 17 1 120 0 0 0 83 17 1 142 0 1 0 93 17 0 103 0 0 0 113 17 0 122 1 0 0 116 17 0 113 0 0 0 117 17 0 113 0 0 0 147 17 0 119 0 0 0 148 17 0 119 0 0 0 180 17 0 120 1 0 0 49 18 1 148 0 0 0 50 18 1 110 1 0 0 89 18 0 107 1 0 1 100 18 0 100 1 0 0 101 18 0 100 1 0 0 132 18 0 90 1 0 1 133 18 0 90 1 0 1 168 18 0 229 0 0 0 205 18 0 120 1 0 0 208 18 0 120 0 0 0 23 19 1 91 1 0 1 33 19 1 102 0 0 0 34 19 1 112 1 0 1 85 19 0 182 0 0 1 96 19 0 95 0 0 0 97 19 0 150 0 0 0 124 19 0 138 1 0 0 129 19 0 189 0 0 0 135 19 0 132 0 0 0 142 19 0 115 0 0 0 181 19 0 105 0 0 0 187 19 0 235 1 1 0 192 19 0 147 1 0 0 193 19 0 147 1 0 0 197 19 0 184 1 1 0 224 19 0 120 1 0 0 27 20 1 150 1 0 0 31 20 1 125 0 0 1 40 20 1 120 1 0 0 44 20 1 80 1 0 1 47 20 1 109 0 0 0 51 20 1 121 1 0 1 60 20 1 122 1 0 0 76 20 1 105 0 0 0 87 20 0 105 1 0 0 104 20 0 120 0 0 1 146 20 0 103 0 0 0 155 20 0 169 0 0 1 160 20 0 141 0 0 1 172 20 0 121 1 0 0 177 20 0 127 0 0 0 201 20 0 120 0 0 0 211 20 0 170 1 0 0 217 20 0 158 0 0 0 20 21 1 165 1 1 0 28 21 1 200 0 0 1 30 21 1 103 0 0 0 52 21 1 100 0 0 0 84 21 1 130 1 1 0 88 21 0 108 1 0 1 91 21 0 124 0 0 0 128 21 0 185 1 0 0 131 21 0 160 0 0 0 144 21 0 110 1 0 1 186 21 0 134 0 0 0 219 21 0 115 0 0 0 42 22 1 130 1 0 1 67 22 1 130 1 0 0 92 22 0 118 0 0 0 98 22 0 95 0 1 0 137 22 0 85 1 0 0 138 22 0 120 0 1 0 140 22 0 130 1 0 0 161 22 0 158 0 0 0 162 22 0 112 1 0 0 174 22 0 131 0 0 0 184 22 0 125 0 0 0 204 22 0 169 0 0 0 220 22 0 129 0 0 0 17 23 1 97 0 0 1 59 23 1 187 1 0 0 63 23 1 120 0 0 0 69 23 1 110 1 0 0 82 23 1 94 1 0 0 130 23 0 130 0 0 0 139 23 0 128 0 0 0 149 23 0 119 0 0 0 164 23 0 115 1 0 0 173 23 0 190 0 0 0 179 23 0 123 0 0 0 182 23 0 130 0 0 0 200 23 0 110 0 0 0 18 24 1 128 0 0 0 19 24 1 132 0 1 0 29 24 1 155 1 0 0 36 24 1 138 0 0 0 61 24 1 105 1 0 0 118 24 0 90 1 0 0 136 24 0 115 0 0 0 150 24 0 110 0 0 0 156 24 0 115 0 0 0 185 24 0 133 0 0 0 196 24 0 110 0 0 0 199 24 0 110 0 0 0 225 24 0 116 0 0 0 13 25 1 105 0 1 0 15 25 1 85 0 0 1 24 25 1 115 0 0 0 26 25 1 92 1 0 0 32 25 1 89 0 0 0 46 25 1 105 0 0 0 103 25 0 118 1 0 0 111 25 0 120 0 0 1 120 25 0 155 0 0 0 121 25 0 125 0 0 0 169 25 0 140 0 0 0 188 25 0 95 1 0 1 202 25 0 241 0 1 0 215 25 0 120 0 0 0 221 25 0 130 0 0 0 35 26 1 117 1 0 0 54 26 1 96 0 0 0 75 26 1 154 0 1 0 77 26 1 190 1 0 0 95 26 0 113 1 0 0 115 26 0 168 1 0 0 154 26 0 133 1 0 0 218 26 0 160 0 0 0 16 27 1 150 0 0 0 43 27 1 130 0 0 1 125 27 0 124 1 0 0 4 28 1 120 1 0 1 79 28 1 95 1 0 0 105 28 0 120 1 0 0 109 28 0 120 0 0 0 112 28 0 167 0 0 0 151 28 0 140 0 0 0 159 28 0 250 1 0 0 212 28 0 134 0 0 0 214 28 0 130 0 0 0 10 29 1 130 0 0 1 94 29 0 123 1 0 0 114 29 0 150 0 0 0 123 29 0 140 1 0 0 190 29 0 135 0 0 0 191 29 0 154 0 0 0 209 29 0 130 1 0 0 65 30 1 142 1 0 0 99 30 0 107 0 0 1 141 30 0 95 1 0 0 145 30 0 153 0 0 0 176 30 0 110 0 0 0 195 30 0 137 0 0 0 203 30 0 112 0 0 0 56 31 1 102 1 0 0 107 31 0 100 0 0 1 126 31 0 215 1 0 0 163 31 0 150 1 0 0 222 31 0 120 0 0 0 22 32 1 105 1 0 0 106 32 0 121 0 0 0 134 32 0 132 0 0 0 170 32 0 134 1 0 0 175 32 0 170 0 0 0 207 32 0 186 0 0 0 ;
The variable Low is used to determine whether the subject is a case ( Low =1, low birth-weight baby) or a control ( Low =0, normal weight baby). The dummy time variable Time takes the value 1 for cases and 2 for controls.
The following SAS statements produce a conditional logistic regression analysis of the data. The variable Time is the response, and Low is the censoring variable. Note that the data set is created so that all the cases have the same event time, and the controls have later censored times. The matching variable Age is used in the STRATA statement so each unique age value defines a stratum. The variables LWT , Smoke , HT , and UI are specified as explanatory variables. The TIES=DISCRETE option requests the discrete logistic model.
proc phreg data=LBW; model Time*Low(0)= LWT Smoke HT UI / ties=discrete; strata Age; run;
The procedure displays a summary of the number of event and censored observations for each stratum. These are the number of cases and controls for each matched set shown in Output 54.3.1.
The PHREG Procedure Model Information Data Set WORK.LBW Dependent Variable Time Censoring Variable Low Censoring Value(s) 0 Ties Handling DISCRETE Summary of the Number of Event and Censored Values Percent Stratum Age Total Event Censored Censored 1 16 7 1 6 85.71 2 17 12 5 7 58.33 3 18 10 2 8 80.00 4 19 16 3 13 81.25 5 20 18 8 10 55.56 6 21 12 5 7 58.33 7 22 13 2 11 84.62 8 23 13 5 8 61.54 9 24 13 5 8 61.54 10 25 15 6 9 60.00 11 26 8 4 4 50.00 12 27 3 2 1 33.33 13 28 9 2 7 77.78 14 29 7 1 6 85.71 15 30 7 1 6 85.71 16 31 5 1 4 80.00 17 32 6 1 5 83.33 ------------------------------------------------------------------- Total 174 54 120 68.97
Results of the conditional logistic regression analysis are shown in Output 54.3.2. Based on the Wald test for individual variables, the variables LWT , Smoke , and HT are statistically significant while UI is marginal.
The hazards ratios, computed by exponentiating the parameter estimates, are useful in interpreting the results of the analysis. If the hazards ratio of a prognostic factor is larger than 1, an increment in the factor increases the hazard rate. If the hazards ratio is less than 1, an increment in the factor decreases the hazard rate. Results indicate that women were more likely to have low birth-weight babies if they were under-weight in the last menstrual cycle, were hypertensive, smoked during pregnancy, or suffered uterine irritability.
The PHREG Procedure Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Without With Criterion Covariates Covariates 2 LOG L 159.069 141.108 AIC 159.069 149.108 SBC 159.069 157.064 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 17.9613 4 0.0013 Score 17.3152 4 0.0017 Wald 15.5577 4 0.0037 Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio LWT 1 0.01498 0.00706 4.5001 0.0339 0.985 Smoke 1 0.80805 0.36797 4.8221 0.0281 2.244 HT 1 1.75143 0.73932 5.6120 0.0178 5.763 UI 1 0.88341 0.48032 3.3827 0.0659 2.419
For matched case-control studies with one case per matched set (1: n matching), the likelihood function for the conditional logistic regression reduces to that of the Cox model for the continuous time scale. For this situation, you can use the default TIES=BRESLOW.
Time-dependent variables can be used to model the effects of subjects transferring from one treatment group to another. One example of the need for such strategies is the Stanford heart transplant program. Patients are accepted if physicians judge them suitable for heart transplant. Then, when a donor becomes available, physicians choose transplant recipients according to various medical criteria. A patient s status can be changed during the study from waiting for a transplant to being a transplant recipient. Transplant status can be defined by the time-dependent covariate function z = z (t) as
The Stanford heart transplant data that appear in Crowley and Hu (1977) consist of 103 patients, 69 of whom received transplants. The data are saved in a SAS data set called Heart . For each patient in the program, there is a birth date ( Bir_Date ), a date of acceptance ( Acc_Date ), and a date last seen ( Ter_Date ). The survival time ( Time ) in days is defined as Time = Ter_Date ˆ’ Acc_Date . The survival time is said to be uncensored ( Status =1) or censored ( Status =0), depending on whether Ter_Date is the date of death or the closing date of the study. The age in years at acceptance into the program is Acc_Age = ( Acc_Date ˆ’ Bir_Date ) / 365. Previous open -heart surgery for each patient is indicated by the variable PrevSurg . For each transplant recipient, there is a date of transplant ( Xpl_Date ) and three measures ( NMismatch , Antigen , Mismatch ) of tissue -type mismatching. The waiting period ( WaitTime ) in days for a transplant recipient is calculated as WaitTime = Xpl_Date ˆ’ Acc_Date , and the age in years at transplant is Xpl_Age = ( Xpl_Date ˆ’ Bir_Date ) / 365. For those who do not receive heart transplants, the WaitTime , Xpl_Age , NMismatch , Antigen , and Mismatch variables contain missing values.
The input data contains dates that have a two-digit year representation. The SAS option YEARCUTOFF=1900 is specified to ensure that a two-digit year xx is year 19xx.
The code is as follows :
options yearcutoff=1900; data Heart; input ID @5 Bir_Date mmddyy8. @14 Acc_Date mmddyy8. @23 Xpl_Date mmddyy8. @32 Ter_Date mmddyy8. @41 Status 1. @43 PrevSurg 1. @45 NMismatch 1. @47 Antigen 1. @49 Mismatch 4. @54 Reject 1. @56 NotTyped .; label Bir_Date ='Date of birth' Acc_Date ='Date of acceptance' Xpl_Date ='Date of transplant' Ter_Date ='Date last seen' Status = 'Dead=1 Alive=0' PrevSurg ='Previous surgery' NMismatch= 'No of mismatches' Antigen = 'HLA-A2 antigen' Mismatch ='Mismatch score' NotTyped = 'y=not tissue-typed'; Time= Ter_Date - Acc_Date; Acc_Age=int((Acc_Date - Bir_Date)/365); if (Xpl_Date ne .) then do; WaitTime= Xpl_Date - Acc_Date; Xpl_Age= int((Xpl_Date - Bir_Date)/365); end; datalines; 1 01 10 37 11 15 67 01 03 68 1 0 2 03 02 16 01 02 68 01 07 68 1 0 3 09 19 13 01 06 68 01 06 68 01 21 68 1 0 2 0 1.11 0 4 12 23 27 03 28 68 05 02 68 05 05 68 1 0 3 0 1.66 0 5 07 28 47 05 10 68 05 27 68 1 0 6 11 18 13 06 13 68 06 15 68 1 0 7 08 29 17 07 12 68 08 31 68 05 17 70 1 0 4 0 1.32 1 8 03 27 23 08 01 68 09 09 68 1 0 9 06 11 21 08 09 68 11 01 68 1 0 10 02 09 26 08 11 68 08 22 68 10 07 68 1 0 2 0 0.61 1 11 08 22 20 08 15 68 09 09 68 01 14 69 1 0 1 0 0.36 0 12 07 09 15 09 17 68 09 24 68 1 0 13 02 22 14 09 19 68 10 05 68 12 08 68 1 0 3 0 1.89 1 14 09 16 14 09 20 68 10 26 68 07 07 72 1 0 1 0 0.87 1 15 12 04 14 09 27 68 09 27 68 1 1 16 05 16 19 10 26 68 11 22 68 08 29 69 1 0 2 0 1.12 1 17 06 29 48 10 28 68 12 02 68 1 0 18 12 27 11 11 01 68 11 20 68 12 13 68 1 0 3 0 2.05 0 19 10 04 09 11 18 68 12 24 68 1 0 20 10 19 13 01 29 69 02 15 69 02 25 69 1 0 3 1 2.76 1 21 09 29 25 02 01 69 02 08 69 11 29 71 1 0 2 0 1.13 1 22 06 05 26 03 18 69 03 29 69 05 07 69 1 0 3 0 1.38 1 23 12 02 10 04 11 69 04 13 69 04 13 71 1 0 3 0 0.96 1 24 07 07 17 04 25 69 07 16 69 11 29 69 1 0 3 1 1.62 1 25 02 06 36 04 28 69 05 22 69 04 01 74 0 0 2 0 1.06 0 26 10 18 38 05 01 69 03 01 73 0 0 27 07 21 60 05 04 69 01 21 70 1 0 28 05 30 15 06 07 69 08 16 69 08 17 69 1 0 2 0 0.47 0 29 02 06 19 07 14 69 08 17 69 1 0 30 09 20 24 08 19 69 09 03 69 12 18 71 1 0 4 0 1.58 1 31 10 04 14 08 23 69 09 07 69 1 0 32 04 02 05 08 29 69 09 14 69 11 13 69 1 0 4 0 0.69 1 33 01 01 21 11 27 69 01 16 70 04 01 74 0 0 3 0 0.91 0 34 05 24 29 12 12 69 01 03 70 04 01 74 0 0 2 0 0.38 0 35 08 04 26 01 21 70 02 01 70 1 0 36 05 01 21 04 04 70 05 19 70 07 12 70 1 0 2 0 2.09 1 37 10 24 08 04 25 70 05 13 70 06 29 70 1 0 3 1 0.87 1 38 11 14 28 05 05 70 05 09 70 05 09 70 1 0 3 0 0.87 0 39 11 12 19 05 20 70 05 21 70 07 11 70 1 0 y 40 11 30 21 05 25 70 07 04 70 04 01 74 0 1 4 0 0.75 0 41 04 30 25 08 19 70 10 15 70 04 01 74 0 1 2 0 0.98 0 42 03 13 34 08 21 70 08 23 70 1 0 43 06 01 27 10 22 70 10 23 70 1 1 44 05 02 28 11 30 70 01 08 71 1 1 45 10 30 34 01 05 71 01 05 71 02 18 71 1 0 1 0 0.0 0 46 06 01 22 01 10 71 01 11 71 10 01 73 1 1 2 0 0.81 1 47 12 28 23 02 02 71 02 22 71 04 14 71 1 0 3 0 1.38 1 48 01 23 15 02 05 71 02 13 71 1 0 49 06 21 34 02 15 71 03 22 71 04 01 74 0 1 4 0 1.35 0 50 03 28 25 02 15 71 05 08 71 10 21 73 1 1 y 51 06 29 22 03 24 71 04 24 71 01 02 72 1 0 4 1 1.08 1 52 01 24 30 04 25 71 08 04 71 1 0 53 02 27 24 07 02 71 08 11 71 01 05 72 1 0 y 54 09 16 23 07 02 71 07 04 71 1 0 55 02 24 19 08 09 71 08 18 71 10 08 71 1 0 2 0 1.51 1 56 12 05 32 09 03 71 11 08 71 04 01 74 0 0 4 0 0.98 0 57 06 08 30 09 13 71 02 08 72 1 0 58 09 17 23 09 23 71 10 13 71 08 30 72 1 1 2 1 1.82 1 59 05 12 30 09 29 71 12 15 71 04 01 74 0 1 2 0 0.19 0 60 10 29 22 11 18 71 11 20 71 01 09 72 1 0 3 0 0.66 1 61 05 12 19 12 04 71 12 05 71 1 0 62 08 01 32 12 09 71 02 15 72 1 0 63 04 15 39 12 12 71 01 07 72 04 01 74 0 0 3 1 1.93 0 64 04 09 23 02 01 72 03 04 72 09 06 73 1 1 1 0 0.12 0 65 11 19 20 03 06 72 03 17 72 05 22 72 1 0 2 0 1.12 1 66 01 02 19 03 20 72 04 20 72 1 0 67 09 03 52 03 23 72 05 18 72 01 01 73 1 0 3 0 1.02 0 68 01 10 27 04 07 72 04 09 72 06 13 72 1 0 3 1 1.68 1 69 06 05 24 06 01 72 06 10 72 04 01 74 0 0 2 0 1.20 0 70 06 17 19 06 17 72 06 21 72 07 16 72 1 0 3 1 1.68 1 71 02 22 25 07 21 72 08 20 72 04 01 74 0 0 3 0 0.97 0 72 11 22 45 08 14 72 08 17 72 04 01 74 0 0 3 1 1.46 0 73 05 13 16 09 11 72 10 07 72 12 09 72 1 0 3 1 2.16 1 74 07 20 43 09 18 72 09 22 72 10 04 72 1 0 1 0 0.61 0 75 07 25 20 09 29 72 09 30 72 1 0 76 09 03 20 10 04 72 11 18 72 04 01 74 0 1 3 1 1.70 0 77 08 27 31 10 06 72 10 26 72 1 0 78 02 20 24 11 03 72 05 31 73 04 01 74 0 0 3 0 0.81 0 79 02 18 19 11 30 72 02 04 73 03 05 73 1 0 2 0 1.08 1 80 06 27 26 12 06 72 12 31 72 04 01 74 0 1 3 0 1.41 0 81 02 21 20 01 12 73 01 17 73 04 01 74 0 0 4 1 1.94 0 82 09 19 42 11 01 71 01 01 73 0 0 83 10 04 19 01 24 73 02 24 73 04 13 73 1 0 4 0 3.05 0 84 05 13 30 01 30 73 03 07 73 12 29 73 1 0 4 0 0.60 1 85 02 13 25 02 06 73 02 10 73 1 0 86 03 30 24 03 01 73 03 08 73 04 01 74 0 0 3 1 1.44 0 87 12 19 26 03 21 73 05 19 73 07 08 73 1 0 2 0 2.25 1 88 11 16 18 03 28 73 04 27 73 04 01 74 0 0 3 0 0.68 0 89 03 19 22 04 05 73 08 21 73 10 28 73 1 0 4 1 1.33 1 90 03 25 21 04 06 73 09 12 73 10 08 73 1 1 3 1 0.82 0 91 09 08 25 04 13 73 03 18 74 1 0 92 05 03 28 04 27 73 03 02 74 04 01 74 0 0 1 0 0.16 0 93 10 10 25 07 11 73 08 07 73 04 01 74 0 0 2 0 0.33 0 94 11 11 29 09 14 73 09 17 73 02 25 74 1 1 3 0 1.20 1 95 06 11 33 09 22 73 09 23 73 10 07 73 1 0 y 96 02 09 47 10 04 73 10 16 73 04 01 74 0 0 2 0 0.46 0 97 04 11 50 11 22 73 12 12 73 04 01 74 0 0 3 1 1.78 0 98 04 28 45 12 14 73 03 19 74 04 01 74 0 0 4 1 0.77 0 99 02 24 24 12 25 73 01 14 74 1 0 100 01 31 39 02 22 74 03 31 74 04 01 74 0 1 3 0 0.67 0 101 08 25 24 03 02 74 04 01 74 0 0 102 10 30 33 03 22 74 04 01 74 0 0 103 05 20 28 09 13 67 09 18 67 1 0 ;
Crowley and Hu (1977) have presented a number of analyses to assess the effects of various explanatory variables on the survival of patients. This example fits two of the models that they have considered.
The first model consists of two explanatory variables ”the transplant status and the age at acceptance. The transplant status ( XStatus ) is a time-dependent variable defined by the programming statements between the MODEL statement and the RUN statement. The XStatus variable takes the value 1 or 0 at time t (measured from the date of acceptance), depending on whether or not the patient has received a transplant at that time. Note that the value of XStatus changes for subjects in each risk set (subjects still alive just before each distinct event time); therefore, the variable cannot be created in the DATA step. The variable Acc_Age , which is not time-dependent, accounts for the possibility that pretransplant risks vary with age.
proc phreg data= Heart; model Time*Status(0)= XStatus Acc_Age; if (WaitTime = . or Time < WaitTime) then XStatus=0.; else XStatus= 1.0; run;
Results of this analysis are shown in Output 54.4.1. Transplantation appears to be associated with a slight decrease in risk, although the effect is not significant ( p = 0 . 8432). The age at acceptance as a pretransplant risk factor adds significantly to the model ( p = 0 . 0294). The risk increases significantly with age at acceptance.
The PHREG Procedure Model Information Data Set WORK.HEART Dependent Variable Time Censoring Variable Status Dead=1 Alive=0 Censoring Value(s) 0 Ties Handling BRESLOW Summary of the Number of Event and Censored Values Percent Total Event Censored Censored 103 75 28 27.18 Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Without With Criterion Covariates Covariates -2 LOG L 596.649 591.312 AIC 596.649 595.312 SBC 596.649 599.947 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 5.3370 2 0.0694 Score 4.7900 2 0.0912 Wald 4.7812 2 0.0916
The PHREG Procedure Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio XStatus 1 0.06046 0.30572 0.0391 0.8432 0.941
The second model consists of three explanatory variables ”the transplant status, the transplant age, and the mismatch score. Four transplant recipients who were not typed have no Mismatch values; they are excluded from the analysis by the use of a WHERE clause. The transplant age ( XAge ) and the mismatch score ( XScore ) are also time-dependent and are defined in a fashion similar to that of XStatus . While the patient is waiting for a transplant, XAge and XScore have a value of 0. After the patient has migrated to the recipient population, XAge takes on the value of Xpl_Age (transplant age for the recipient), and XScore takes on the value of Mismatch (a measure of the degree of dissimilarity between donor and recipient).
proc phreg data= Heart; model Time*Status(0)= XStatus XAge XScore; where NotTyped ^= y; if (WaitTime=.orTime < WaitTime) then do; XStatus=0.; XAge=0.; XScore= 0.; end; else do; XStatus= 1.0; XAge= Xpl_Age; XScore= Mismatch; end; run;
Results of the analysis are shown in Output 54.4.2. Note that only 99 patients are included in this analysis, instead of 103 patients as in the previous analysis, since four transplant recipients who were not typed are excluded. The variable XAge is statistically significant ( p = 0 . 0146) with a hazards ratio exceeding 1. Therefore, patients who had a transplant at younger ages lived longer than those who received a transplant later in their lives. The variable XScore has only minimal effect on the survival ( p = 0 . 1129).
The PHREG Procedure Model Information Data Set WORK.HEART Dependent Variable Time Censoring Variable Status Dead=1 Alive=0 Censoring Value(s) 0 Ties Handling BRESLOW Summary of the Number of Event and Censored Values Percent Total Event Censored Censored 99 71 28 28.28 Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Without With Criterion Covariates Covariates -2 LOG L 561.646 551.911 AIC 561.646 557.911 SBC 561.646 564.699 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 9.7350 3 0.0210 Score 9.0127 3 0.0291 Wald 9.0156 3 0.0291 Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio XStatus 1 3.17799 1.18612 7.1787 0.0074 0.042 XAge 1 0.05517 0.02259 5.9649 0.0146 1.057 XScore 1 0.44424 0.28026 2.5125 0.1129 1.559
Repeated determinations may be made during the course of a study of variables thought to be related to survival. Consider an experiment to study the dosing effect of a tumor-promoting agent. Forty-five rodents initially exposed to a carcinogen were randomly assigned to three dose groups. After the first death of an animal, the rodents were examined every week for the number of papillomas. Investigators were interested in determining the effects of dose on the carcinoma incidence after adjusting for the number of papillomas.
The input data set TUMOR consists of the following 19 variables:
ID (subject identification)
Time (survival time of the subject)
Dead (censoring status where 1=dead and 0=censored)
Dose (dose of the tumor-promoting agent)
P1 “P15 (number of papillomas at the 15 times that animals died. These 15 death times are weeks 27, 34, 37, 41, 43, 45, 46, 47, 49, 50, 51, 53, 65, 67, and 71. For instance, subject 1 died at week 47; it had no papilloma at week 27, five papillomas at week 34, six at week 37, eight at week 41, and 10 at weeks 43, 45, 46, and 47. For an animal that died before week 71, the number of papillomas is missing for those times beyond its death.)
The following SAS statements create the data set TUMOR:
data Tumor; infile datalines missover; input ID Time Dead Dose P1-P15; label ID=Subject ID; datalines; 1 47 1 1.0 0 5 6 8 10 10 10 10 2 71 1 1.0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 3 81 0 1.0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 81 0 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 81 0 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 65 1 1.0 0 0 0 1 1 1 1 1 1 1 1 1 1 7 71 0 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 69 0 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 67 1 1.0 0 0 1 1 2 2 2 2 3 3 3 3 3 3 10 81 0 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 37 1 1.0 9 9 9 12 81 0 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 77 0 1.0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 14 81 0 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 81 0 1.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16 54 0 2.5 0 1 1 1 2 2 2 2 2 2 2 2 17 53 0 2.5 0 0 0 0 0 0 0 0 0 0 0 0 18 38 0 2.5 5 13 14 19 54 0 2.5 2 6 6 6 6 6 6 6 6 6 6 6 20 51 1 2.5 15 15 15 16 16 17 17 17 17 17 17 21 47 1 2.5 13 20 20 20 20 20 20 20 22 27 1 2.5 22 23 41 1 2.5 6 13 13 13 24 49 1 2.5 0 3 3 3 3 3 3 3 3 25 53 0 2.5 0 0 1 1 1 1 1 1 1 1 1 1 26 50 1 2.5 0 0 2 3 4 6 6 6 6 6 27 37 1 2.5 3 15 15 28 49 1 2.5 2 3 3 3 3 4 4 4 4 29 46 1 2.5 4 6 7 9 9 9 9 30 48 0 2.5 15 26 26 26 26 26 26 26 31 54 0 10.0 12 14 15 15 15 15 15 15 15 15 15 15 32 37 1 10.0 12 16 17 33 53 1 10.0 3 6 6 6 6 6 6 6 6 6 6 6 34 45 1 10.0 4 12 15 20 20 20 35 53 0 10.0 6 10 13 13 13 15 15 15 15 15 15 20 36 49 1 10.0 0 2 2 2 2 2 2 2 2 37 39 0 10.0 7 8 8 38 27 1 10.0 17 39 49 1 10.0 0 6 9 14 14 14 14 14 14 40 43 1 10.0 14 18 20 20 20 41 28 0 10.0 8 42 34 1 10.0 11 18 43 45 1 10.0 10 12 16 16 16 16 44 37 1 10.0 0 1 1 45 43 1 10.0 9 19 19 19 19 ;
The number of papillomas (NPap) for each animal in the study was measured repeatedly over time. One way of handling time-dependent repeated measurements in the PHREG procedure is to use programming statements to capture the appropriate covariate values of the subjects in each risk set. In this example, NPap is a time-dependent explanatory variable with values that are calculated by means of the programming statements shown in the following SAS statements:
proc phreg data=Tumor; model Time*Dead(0)=Dose NPap; array pp{*} P1-P14; array tt{*} t1-t15; t1 = 27; t2 = 34; t3 = 37; t4 = 41; t5 = 43; t6 = 45; t7 = 46; t8 = 47; t9 = 49; t10= 50; t11= 51; t12= 53; t13= 65; t14= 67; t15= 71; if Time < tt[1] then NPap=0; else if time >= tt [15] then NPap=P15; else do i=1 to dim(pp); if tt[i] <= Time < tt[i+1] then NPap= pp[i]; end; run;
At each death time, the NPap value of each subject in the risk set is recalculated to reflect the actual number of papillomas at the given death time. For instance, subject one in the data set Tumor was in the risk sets at weeks 27 and 34; at week 27, the animal had no papilloma, while at week 34, it had five papillomas. Results of the analysis are shown in Output 54.5.1.
The PHREG Procedure Model Information Data Set WORK.TUMOR Dependent Variable Time Censoring Variable Dead Censoring Value(s) 0 Ties Handling BRESLOW Summary of the Number of Event and Censored Values Percent Total Event Censored Censored 45 25 20 44.44 Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Without With Criterion Covariates Covariates -2 LOG L 166.793 143.269 AIC 166.793 147.269 SBC 166.793 149.707 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 23.5243 2 <.0001 Score 28.0498 2 <.0001 Wald 21.1646 2 <.0001 Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio Dose 1 0.06885 0.05620 1.5010 0.2205 1.071 NPap 1 0.11714 0.02998 15.2705 <.0001 1.124
After the number of papillomas is adjusted for, the dose effect of the tumor-promoting agent is not statistically significant.
Another way to handle time-dependent repeated measurements in the PHREG procedure is to use the counting process style of input. Multiple records are created for each subject, one record for each distinct pattern of the time-dependent measurements. Each record contains a T1 value and a T2 value representing the time interval ( T1 , T2 ] during which the values of the explanatory variables remain unchanged. Each record also contains the censoring status at T2 .
One advantage of using the counting process formulation is that you can easily obtain various residuals and influence statistics that are not available when programming statements are used to compute the values of the time-dependent variables. On the other hand, creating multiple records for the counting process formulation requires extra effort in data manipulation.
Consider a counting process style of input data set named Tumor1 . It contains multiple observations for each subject in the data set Tumor . In addition to variables ID , Time , Dead , and Dose , four new variables are generated:
T1 (left endpoint of the risk interval)
T2 (right endpoint of the risk interval)
NPap (number of papillomas in the time interval ( T1 , T2 ])
Status (censoring status at T2 )
For example, five observations are generated for the rodent that died at week 47 and that had no papilloma at week 27, five papillomas at week 34, six at week 37, eight at week 41, and 10 at weeks 43, 45, 46, and 47. The values of T1 , T2 , NPap , and Status for these five observations are (0,27,0,0), (27,34,5,0), (34,37,6,0), (37,41,8,0), and (41,47,10,1). Note that the variables ID , Time , and Dead are not needed for the estimation of the regression parameters, but they are useful for plotting the residuals.
The following SAS statements create the data set Tumor1 :
data Tumor1(keep=ID Time Dead Dose T1 T2 NPap Status); array pp{*} P1-P14; array qq{*} P2-P15; array tt{1:15} _temporary_ (27 34 37 41 43 45 46 47 49 50 51 53 65 67 71); set Tumor; T1=0; T2=0; Status = 0; if (Time = tt[1]) then do; T2 = tt[1]; NPap = p1; Status = Dead; output; end; else do _i_=1 to dim(pp); if (tt[_i_] = Time) then do; T2= Time; NPap = pp[_i_] ; Status = Dead; output; end; else if (tt[_i_] < Time) then do; if (pp[_i_] ^= qq[_i_]) then do; if qq[_i_] = . then T2= Time; else T2= tt[_i_] ; NPap= pp[_i_] ; Status= 0; output; T1 = T2; end; end; end; if (Time >= tt[15]) then do; T2 = Time; NPap = P15; Status = Dead; output; end; run;
In the following SAS statements, the counting process MODEL specification is used. The DFBETA statistics are output to a SAS data set named Out1 . Note that Out1 contains multiple observations for each subject, that is, one observation for each risk interval ( T1 , T2 ].
proc phreg data=Tumor1; model (T1,T2)*Status(0)=Dose NPap; output out=Out1 resmart=mart dfbeta=db1-db2/order=data; id ID Time Dead; run;
The output from PROC PHREG (not shown) is identical to Output 54.5.1 except for the Summary of the Number of Event and Censored Values table. The number of event observations remains unchanged between the two specifications of PROC PHREG, but the number of censored observations differs due to the splitting of each subject s data into multiple observations for the counting process style of input.
Next, the MEANS procedure sums up the component statistics for each subject and outputs the results to a SAS data set named Out2 .
proc means data=Out1 noprint; by ID Time Dead; var mart db1-db2; output out=Out2 sum=mart db_dose db_npap; run;
Finally, DFBETA statistics are plotted against subject ID for easy identification of influential points.
symbol1 v=dot h=0.8 c=blue; axis1 label = (angle=-90 rotate=90 DFBETA for Dose) minor = none order = (-.04 to .04 by .01); axis2 label = (angle=-90 rotate=90 DFBETA for NPap) minor = none order = (-.030 to .020 by .005); title Plot of DFBETA; proc gplot data=Out2; plot db_dose * ID / frame hminor=0 vaxis=axis1 cframe=ligr; plot db_npap * ID / frame hminor=0 vaxis=axis2 cframe=ligr; run;
The plots of the DFBETA statistics are shown in Output 54.5.2 and Output 54.5.3. Subject 30 appears to have a large influence on both the Dose and NPap coefficients. Subjects 31 and 35 have considerable influences on the DOSE coefficient, while subjects 22 and 44 have rather large influences on the NPap coefficient.
You may want to use your regression analysis results to generate predicted survival curves for subjects not in the study. This example illustrates how to use the BASELINE statement to obtain the survivor function for a new set of explanatory variable values. The various sets of explanatory variable values must be contained in a SAS data set.
In previous examples, LogBUN and HGB were identified as the most important prognostic factors for the myeloma data. Suppose you are interested in obtaining the survivor function estimates for the following two realizations of LogBUN and HGB , which are saved in a SAS data set called Inrisks .
data Inrisks; input LogBUN HGB; datalines; 1.00 10.0 1.80 12.0 ;
In the BASELINE statement, you specify the name of the data set (COVARIATE= Inrisk ) that contains the various sets of explanatory variable values and the name of the output SAS data set (OUT=Pred1) that contains the survivor function estimates. The option SURVIVAL=S puts the variable S containing the survivor function estimates in the output data set Pred1 . Similarly, the options LOWER=S_lower and UPPER=S_ upper put the variables S_lower and S_upper in Pred1 ; these variables contain, respectively, the lower and upper 95% confidence limits for the survival. The NOPRINT option in the PROC PHREG statement suppresses the displayed output (the analysis results are shown in Example 54.1). The PRINT procedure displays the observations in the data set Pred1 .
proc phreg data=Myeloma noprint; model Time*VStatus(0)=LogBUN HGB; baseline covariates=Inrisks out=Pred1 survival=S lower=S_lower upper=S_upper; run; proc print data=Pred1; run;
The first 32 observations of the data set Pred1 are shown in Output 54.6.1. They represent the survivor function for the realization LogBUN =1.00 and HGB =10.0. The first observation has survival time 0 and survivor function estimate 1.0. Each of the remaining 31 observations represents each unique event time in the input data set Myeloma . These observations are presented in ascending order of the event times. Likewise, the next 32 observations of the data set Pred1 (starting from the 33rd observation) represent the survivor function for the realization LogBUN =1.80 and HGB =12.0.
Log Obs BUN HGB Time S S_lower S_upper 1 1 10 0.00 1.00000 . . 2 1 10 1.25 0.98622 0.96600 1.00000 3 1 10 2.00 0.96438 0.92775 1.00000 4 1 10 3.00 0.95687 0.91513 1.00000 5 1 10 5.00 0.93966 0.88745 0.99494 6 1 10 6.00 0.90211 0.83101 0.97929 7 1 10 7.00 0.87192 0.78793 0.96487 8 1 10 9.00 0.86073 0.77215 0.95947 9 1 10 11.00 0.80252 0.69458 0.92725 10 1 10 13.00 0.78969 0.67751 0.92044 11 1 10 14.00 0.77554 0.65896 0.91274 12 1 10 15.00 0.76116 0.64048 0.90458 13 1 10 16.00 0.73142 0.60343 0.88654 14 1 10 17.00 0.69988 0.56494 0.86706 15 1 10 18.00 0.68345 0.54525 0.85667 16 1 10 19.00 0.64951 0.50561 0.83438 17 1 10 24.00 0.63105 0.48401 0.82278 18 1 10 25.00 0.61267 0.46287 0.81096 19 1 10 26.00 0.59428 0.44209 0.79887 20 1 10 32.00 0.57437 0.41972 0.78601 21 1 10 35.00 0.55400 0.39725 0.77258 22 1 10 37.00 0.53276 0.37421 0.75849 23 1 10 41.00 0.48783 0.32796 0.72564 24 1 10 51.00 0.45964 0.29978 0.70476 25 1 10 52.00 0.42933 0.27013 0.68234 26 1 10 54.00 0.39588 0.23828 0.65773 27 1 10 58.00 0.35744 0.20219 0.63191 28 1 10 66.00 0.31314 0.16511 0.59386 29 1 10 67.00 0.26060 0.12215 0.55597 30 1 10 88.00 0.19554 0.07520 0.50849 31 1 10 89.00 0.12708 0.03552 0.45460 32 1 10 92.00 0.00000 . .
By default, the procedure also outputs the set of survivor function estimates for LogBUN =1.3929 and HGB =10.2015, which are the sample means of LogBUN and HGB for the input data in Myeloma . (Note that in a stratified analysis, the sample means are calculated within each stratum.) The estimated survivor function estimates for these sample means are the last 32 observations in the data set Pred1 . You can suppress this set of survival estimates by using the NOMEAN option in the BASELINE statement.
proc phreg data=Myeloma noprint; model Time*VStatus(0)=LogBUN HGB; baseline covariates=Inrisks out=Pred2 survival=S lower=S_lower upper=S_upper / nomean; run;
The data set Pred2 consists of the first 64 observations of Pred1 . If you are interested only in the survivor function estimates for the sample means of the explanatory variables, you can omit the COVARIATES= option in the BASELINE statement.
proc phreg data=Myeloma noprint; model Time*VStatus(0)=LogBUN HGB; baseline out=Pred3 survival=S lower=S_lower upper=S_upper; run;
The data set Pred3 contains the last 32 observations of Pred1 .
The following SAS statements are used to plot the survival curves in Pred1 . For convenience, the variable Pattern is added to the data set Pred1 to identify the various patterns of explanatory variables.
data Pred1; set Pred1; if LogBUN= 1.0 and HGB=10.0 then Pattern=1; else if LogBUN= 1.8 and HGB=12.0 then Pattern=2; else Pattern=3; legend1 label=none shape=symbol(3, .8) value=(f=swiss h=.8 LogBUN=1.00 HGB=10.0 LogBUN=1.80 HGB=12.0 LogBUN=1.39 HGB=10.2); axis1 label=(h=1 f=swiss a=90) minor=(n=1); axis2 label=(h=1 f=swiss Survival Time in Months) minor=(n=4); proc gplot data=Pred1; plot S*Time=Pattern / legend=legend1 vaxis=axis1 haxis=axis2 cframe=ligr; symbol1 interpol=stepLJ h=1 v=square c=blue; symbol2 interpol=stepLJ h=1 v=diamond c=yellow; symbol3 interpol=stepLJ h=1 v=circle c=red; note f=swiss h=1.5 j=c Myeloma Study; footnote h=.8 f=duplex LogBUN=1.39 and HGB=10.2 correspond to the sample means; run;
The survivor function estimates for these three patterns of explanatory variables are displayed in Output 54.6.2. Note that these survivor functions are portrayed as right-continuous functions.
Residuals are used to investigate the lack of fit of a model to a given subject. You can obtain martingale and deviance residuals for the Cox proportional hazards regression analysis by requesting that they be included in the OUTPUT data set. You can plot these statistics and look for outliers.
Consider the stepwise regression analysis performed in Example 54.1. Thefinal model included variables LogBUN and HGB . You can generate residual statistics for this analysis by refitting the model containing those variables and including an OUTPUT statement. The keywords XBETA, RESMART, and RESDEV identify new variables that contain the linear predictor scores , martingale residuals, and deviance residuals. These variables are xb , mart , and dev , respectively.
proc phreg data=Myeloma noprint; model Time*Vstatus(0)=LogBUN HGB; output out=Outp xbeta=xb resmart=mart resdev=dev; run;
The following statements plot the residuals against the linear predictor scores:
proc gplot data=Outp; plot (mart dev)*xb / vref=0 cframe=ligr; symbol1 value=circle c=blue; run;
The resulting plots are shown in Output 54.7.1 and Output 54.7.2. The martingale residuals are skewed because of the single event setting of the Cox model. The martingale residual plot shows an isolation point (with linear predictor score 1.09 and martingale residual ˆ’ 3.37), but this observation is no longer distinguishable in the deviance residual plot. In conclusion, there is no indication of a lack of fitofthe model to individual observations.
Recurrent events data consists of times to a number of repeated events for each sample unit; for example, times of recurrent episodes of a disease in patients. Various ways for analyzing recurrent events data are described in the section Analysis of Multivariate Failure Time Data on page 3247. The bladder cancer data listed in Wei , Lin, and Weissfeld (1989) is used here to illustrate these methods .
The data consist of 86 patients with superficial bladder tumors, which were removed when the patients entered the study. Of these patients, 48 were randomized into the placebo group, and 38 were randomized into the thiotepa group. Many patients had multiple recurrences of tumors during the study, and new tumors were removed at each visit. The data set contains the first four recurrences of the tumor for each patient, and each recurrence time was measured from the patient s entry time into the study.
The data consist of the following eight variables:
Trt , treatment group (1=placebo and 2=thiotepa)
Time , follow-up time
Number , number of initial tumors
Size , initial tumor size
T1 , T2 , T3 , and T4 , times of the four potential recurrences of the bladder tumor. A patient with only two recurrences has missing values in T3 and T4 .
In the data set Bladder , four observations are created for each patient, one for each of the four potential tumor recurrences. In addition to values of Trt , Number , and Size for the patient, each observation contains the following variables:
ID , patient s identification (which is the sequence number of the subject)
Visit , visit number (with value k for the k th potential tumor recurrence)
TStart , time of the ( k -1)th recurrence for Visit = k , or the entry time 0 if VISIT=1, or the follow-up time if the ( k -1)th recurrence does not occur
TStop , time of the k th recurrence if Visit = k or follow-up time if the k th recurrence does not occur
Status , event status of TStop (1=recurrence and 0=censored)
For instance, a patient with only one recurrence time at month 6, who was followed until month 10, will have values for Visit , TStart , TStop , and Status of (1,0,6,1), (2,6,10,0), (3,10,10,0), and (4,10,10,0). The last two observations are redundant for the intensity model and the proportional means model, but they are important for the analysis of the marginal Cox models. If the follow-up time is beyond the time of the fourth turmor recurrence, it is tempting to create a fifth observation with the time of the fourth tumor recurrence as the TStart value, the follow-up time as the TStop value, and a Status value of 0. However, Therneau and Grambsch (2000), Section 8.5) have warned against incorporating such observations into the analysis.
The following SAS statements create the data set Bladder :
data Bladder; keep ID TStart TStop Status Trt Number Size Visit; retain ID TStart 0; array tt T1-T4; infile datalines missover; input Trt Time Number Size T1-T4; ID+1; TStart=0; do over tt; Visit=_i_; if tt = . then do; TStop=Time; Status=0; end; else do; TStop=tt; Status=1; end; output; TStart=TStop; end; if (TStart < Time) then delete; datalines; 1 0 1 1 1 1 1 3 1 4 2 1 1 7 1 1 1 10 5 1 1 10 4 1 6 1 14 1 1 1 18 1 1 1 18 1 3 5 1 18 1 1 12 16 1 23 3 3 1 23 1 3 10 15 1 23 1 1 3 16 23 1 23 3 1 3 9 21 1 24 2 3 7 10 16 24 1 25 1 1 3 15 25 1 26 1 2 1 26 8 1 1 1 26 1 4 2 26 1 28 1 2 25 1 29 1 4 1 29 1 2 1 29 4 1 1 30 1 6 28 30 1 30 1 5 2 17 22 1 30 2 1 3 6 8 12 1 31 1 3 12 15 24 1 32 1 2 1 34 2 1 1 36 2 1 1 36 3 1 29 1 37 1 2 1 40 4 1 9 17 22 24 1 40 5 1 16 19 23 29 1 41 1 2 1 43 1 1 3 1 43 2 6 6 1 44 2 1 3 6 9 1 45 1 1 9 11 20 26 1 48 1 1 18 1 49 1 3 1 51 3 1 35 1 53 1 7 17 1 53 3 1 3 15 46 51 1 59 1 1 1 61 3 2 2 15 24 30 1 64 1 3 5 14 19 27 1 64 2 3 2 8 12 13 2 1 1 3 2 1 1 1 2 5 8 1 5 2 9 1 2 2 10 1 1 2 13 1 1 2 14 2 6 3 2 17 5 3 1 3 5 7 2 18 5 1 2 18 1 3 17 2 19 5 1 2 2 21 1 1 17 19 2 22 1 1 2 25 1 3 2 25 1 5 2 25 1 1 2 26 1 1 6 12 13 2 27 1 1 6 2 29 2 1 2 2 36 8 3 26 35 2 38 1 1 2 39 1 1 22 23 27 32 2 39 6 1 4 16 23 27 2 40 3 1 24 26 29 40 2 41 3 2 2 41 1 1 2 43 1 1 1 27 2 44 1 1 2 44 6 1 2 20 23 27 2 45 1 2 2 46 1 4 2 2 46 1 4 2 49 3 3 2 50 1 1 2 50 4 1 4 24 47 2 54 3 4 2 54 2 1 38 2 59 1 3 ; run;
First, consider fitting the intensity model (Andersen and Gill 1982) and the proportional means model (Lin et al. 2000). The counting process style of input is used in the PROC PHREG specification. For the proportional means model, inference is based on the robust sandwich covariance estimate, which is requested by the COVB(AGGREGATE) option in the PROC PHREG statement. The COVM option is specified for the analysis of the intensity model to use the model-based covariance estimate. Note that some of the observations in the data set Bladder haveadegenerated interval of risk. The presence of these observations does not affect the results of the analysis since none of these observations are included in any of the risk sets. However, the procedure will run more efficiently without these observations; consequently, in the following SAS statements, the WHERE clause is used to eliminate these redundant observations.
title Intensity Model and Proportional Means Model; proc phreg data=Bladder covm covs(aggregate); model (TStart, TStop) * Status(0) = Trt Number Size; id id; where TStart < TStop; run;
Results of fitting the intensity model and the proportional means model are shown in Output 54.8.1 and Output 54.8.2, respectively. The robust sandwich standard error estimate for Trt is larger than its model-based counterpart , rendering the effect of thiotepa less significant in the proportional means model ( p =0.0747) than in the intensity model ( p =0.0215).
The PHREG Procedure Analysis of Maximum Likelihood Estimates with Model-Based Variance Estimate Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio Trt 1 0.45979 0.19996 5.2873 0.0215 0.631 Number 1 0.17165 0.04733 13.1541 0.0003 1.187 Size 1 0.04256 0.06903 0.3801 0.5375 0.958
Analysis of Maximum Likelihood Estimates with Sandwich Variance Estimate Parameter Standard StdErr Hazard Variable DF Estimate Error Ratio Chi-Square Pr > ChiSq Ratio Trt 1 -0.45979 0.25801 1.290 3.1757 0.0747 0.631 Number 1 0.17165 0.06131 1.296 7.8373 0.0051 1.187 Size 1 -0.04256 0.07555 1.094 0.3174 0.5732 0.958
Next, consider the conditional models of PWP (Prentice, Williams, and Peterson 1981). In the PWP models, the risk set for the ( k +1)th recurrence is restricted to those patients who have experienced the first k recurrences. For example, a patient who experienced only one recurrence is an event observation for the first recurrence; this patient is a censored observation for the second recurrence and should not be included in the risk set for the third or fourth recurrence. The following DATA step eliminates those observations that should not be in the risk sets, forming a new input data set (named Bladder2 ) for fitting the PWP models. The variable Gaptime , represented the gap times between successive recurrences, is also created.
data Bladder2(drop=LastStatus); retain LastStatus; set Bladder; by ID; if first.id then LastStatus=1; if (Status=0 and LastStatus=0) then delete; LastStatus=Status; Gaptime=Tstop-Tstart; run;
The following statements fit the PWP total time model. Variables Trt1 , Trt2 , Trt3 , and Trt4 are visit-specific variables for Trt ; variables Number1 , Number2 , Numvber3 , and Number4 are visit-specific variables for Number ; and variables Size1 , Size2 , Size3 , and Size4 are visit-specific variables for Size .
title PWP Total Time Model with Noncommon Effects; proc phreg data=Bladder2; model (TStart,Tstop) * Status(0) = Trt1-Trt4 Number1-Number4 Size1-Size4; Trt1= Trt * (Visit=1); Trt2= Trt * (Visit=2); Trt3= Trt * (Visit=3); Trt4= Trt * (Visit=4); Number1= Number * (Visit=1); Number2= Number * (Visit=2); Number3= Number * (Visit=3); Number4= Number * (Visit=4); Size1= Size * (Visit=1); Size2= Size * (Visit=2); Size3= Size * (Visit=3); Size4= Size * (Visit=4); strata Visit; run;
Results of the analysis of the PWP total time model are shown in Output 54.8.3. Note that patients who were at risk for a second recurrence are those who had a first recurrence. There is no significant treatment effect on the total time in any of the four tumor recurrences.
The PHREG Procedure Summary of the Number of Event and Censored Values Percent Stratum Visit Total Event Censored Censored 1 1 85 47 38 44.71 2 2 46 29 17 36.96 3 3 27 22 5 18.52 4 4 20 14 6 30.00 ------------------------------------------------------------------- Total 178 112 66 37.08 Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio Trt1 1 0.51757 0.31576 2.6868 0.1012 0.596 Trt2 1 0.45967 0.40642 1.2792 0.2581 0.631 Trt3 1 0.11700 0.67183 0.0303 0.8617 1.124 Trt4 1 0.04059 0.79251 0.0026 0.9592 0.960 Number1 1 0.23605 0.07607 9.6287 0.0019 1.266 Number2 1 0.02044 0.09052 0.0510 0.8213 0.980 Number3 1 0.01219 0.18208 0.0045 0.9466 1.012 Number4 1 0.18915 0.24443 0.5989 0.4390 1.208 Size1 1 0.06790 0.10125 0.4498 0.5024 1.070 Size2 1 0.15425 0.12300 1.5728 0.2098 0.857 Size3 1 0.14891 0.26299 0.3206 0.5713 1.161 Size4 1 0.0000732 0.34297 0.0000 0.9998 1.000
The following statements fit the PWP gap-time model.
title PWP Gap Time Model with Noncommon Effects; proc phreg data=Bladder2; model Gaptime * Status(0) = Trt1-Trt4 Number1-Number4 Size1-Size4; Trt1= Trt * (Visit=1); Trt2= Trt * (Visit=2); Trt3= Trt * (Visit=3); Trt4= Trt * (Visit=4); Number1= Number * (Visit=1); Number2= Number * (Visit=2); Number3= Number * (Visit=3); Number4= Number * (Visit=4); Size1= Size * (Visit=1); Size2= Size * (Visit=2); Size3= Size * (Visit=3); Size4= Size * (Visit=4); strata Visit; run;
Results of the analysis of the PWP gap-time model are shown in Output 54.8.4. Note that the regression coefficients for the first tumor recurrence are the same as those of the total time model, since the total time and and the gap time are the same for the first recurrence. There is no significant treatment effect on the gap times for any of the four tumor recurrences.
The PHREG Procedure Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio Trt1 1 0.51757 0.31576 2.6868 0.1012 0.596 Trt2 1 0.25911 0.40511 0.4091 0.5224 0.772 Trt3 1 0.22105 0.54909 0.1621 0.6873 1.247 Trt4 1 0.19498 0.64184 0.0923 0.7613 0.823 Number1 1 0.23605 0.07607 9.6287 0.0019 1.266 Number2 1 0.00571 0.09667 0.0035 0.9529 0.994 Number3 1 0.12935 0.15970 0.6561 0.4180 1.138 Number4 1 0.42079 0.19816 4.5091 0.0337 1.523 Size1 1 0.06790 0.10125 0.4498 0.5024 1.070 Size2 1 0.11636 0.11924 0.9524 0.3291 0.890 Size3 1 0.24995 0.23113 1.1695 0.2795 1.284 Size4 1 0.03557 0.29043 0.0150 0.9025 1.036
You can fit the PWP total time model with common effects with the following SAS statements. However, the analysis is not shown here.
title2 PWP Total Time Model with Common Effects; proc phreg data=Bladder2; model (tstart,tstop) * status(0) = Trt Number Size; strata Visit; run;
You can fit the PWP gap time model with common effects with the following statements. Again, the analysis is not shown here.
title2 PWP Gap Time Model with Common Effects; proc phreg data=Bladder2; model Gaptime * Status(0) = Trt Number Vize; strata Visit; run;
Recurrent events data are a special case of multiple events data in which the recurrence times are regarded as multivariate failure times and the marginal approach of WLW (Wei, Lin, and Weissfeld 1989) can be used. WLW fits a Cox model to each of the component times and makes statistical inference of the regression parameters based on a robust sandwich covariance matrix estimate. No specific correlation structure is imposed on the multivariate failure times. For the k th marginal model, let ² k denote the row vector of regression parameters, let k denote the maximum likelihood estimate of ² k , let ‚ k denote the covariance matrix obtained by inverting the observed information matrix, and let R k denote the matrix of score residuals. WLW showed that the joint distribution of ( 1 , ..., 4 ) ² can be approximated by a multivariate normal distribution with mean vector ( ² 1 , ..., ² 4 ) ² and robust covariance matrix
with the submatrix V ij given by
In this example, there are four marginal proportional hazards models, one for each potential recurrence time. Instead of fitting one model at a time, you can fit all four marginal models in one analysis by using the STRATA statement and model-specific covariates. Using the Visit as the STRATA variable on the input data set Bladder , PROC PHREG simultaneously fits all four marginal models, one for each Visit value. The COVS(AGGREGATE) option is specified to compute the robust sandwich variance estimate by summing up the score residuals for each distinct pattern of ID value. The TEST statement TREATMENT is used to perform the global test of no treatment effect for each tumor recurrence, the AVERAGE option is specified to estimate the parameter for the common treatment effect, and the E option displays the optimal weights for the common treatment effect.
proc phreg data=Bladder covs(aggregate); model TStop*Status(0)=Trt1-Trt4 Number1-Number4 Size1-Size4; Trt1= Trt * (Visit=1); Trt2= Trt * (Visit=2); Trt3= Trt * (Visit=3); Trt4= Trt * (Visit=4); Number1= Number * (Visit=1); Number2= Number * (Visit=2); Number3= Number * (Visit=3); Number4= Number * (Visit=4); Size1= Size * (Visit=1); Size2= Size * (Visit=2); Size3= Size * (Visit=3); Size4= Size * (Visit=4); strata Visit; id ID; TREATMENT: test trt1,trt2,trt3,trt4/average e; run;
Out of the 86 patients, 47 patients have only one tumor recurrence, 29 patients have two recurrences, 22 patients have three recurrences, and 14 patients have four recurrences (Output 54.8.5). Parameter estimates for the four marginal models are shown in Output 54.8.6. The 4 DF Wald test (Output 54.8.7) indicates a lack of evidence of a treatment effect in any of the four recurrences ( p =0.4105). The optimal weights for estimating the parameter of the common treatment effect are 0.67684, 0.25723, -0.07547, and 0.14140 for Trt1 , Trt2 , Trt3 , and Trt4 , respectively, which gives a parameter estimate of -0.5489 with a standard error estimate of 0.2853. A more sensitive test for a treatment effect is the 1 DF test based on this common parameter; however, there is still insufficient evidence for such effect at the 0.05 level ( p =0.0543).
The PHREG Procedure Summary of the Number of Event and Censored Values Percent Stratum Visit Total Event Censored Censored 1 1 86 47 39 45.35 2 2 86 29 57 66.28 3 3 86 22 64 74.42 4 4 86 14 72 83.72 ------------------------------------------------------------------- Total 344 112 232 67.44
Analysis of Maximum Likelihood Estimates Parameter Standard StdErr Hazard Variable DF Estimate Error Ratio Chi-Square Pr > ChiSq Ratio Trt1 1 0.51762 0.30750 0.974 2.8336 0.0923 0.596 Trt2 1 0.61944 0.36391 0.926 2.8975 0.0887 0.538 Trt3 1 0.69988 0.41516 0.903 2.8419 0.0918 0.497 Trt4 1 0.65079 0.48971 0.848 1.7661 0.1839 0.522 Number1 1 0.23599 0.07208 0.947 10.7204 0.0011 1.266 Number2 1 0.13756 0.08690 0.946 2.5059 0.1134 1.147 Number3 1 0.16984 0.10356 0.984 2.6896 0.1010 1.185 Number4 1 0.32880 0.11382 0.909 8.3453 0.0039 1.389 Size1 1 0.06789 0.08529 0.842 0.6336 0.4260 1.070 Size2 1 0.07612 0.11812 0.881 0.4153 0.5193 0.927 Size3 1 0.21131 0.17198 0.943 1.5097 0.2192 0.810 Size4 1 0.20317 0.19106 0.830 1.1308 0.2876 0.816
Linear Coefficients for Test TREATMENT Average Parameter Row1 Row2 Row3 Row4 Effect Trt1 1 0 0 0 0.67684 Trt2 0 1 0 0 0.25723 Trt3 0 0 1 0 0.07547 Trt4 0 0 0 1 0.14140 Number1 0 0 0 0 0.00000 Number2 0 0 0 0 0.00000 Number3 0 0 0 0 0.00000 Number4 0 0 0 0 0.00000 Size1 0 0 0 0 0.00000 Size2 0 0 0 0 0.00000 Size3 0 0 0 0 0.00000 Size4 0 0 0 0 0.00000 CONSTANT 0 0 0 0 0.00000 Test TREATMENT Results Wald Chi-Square DF Pr > ChiSq 3.9668 4 0.4105 Average Effect for Test TREATMENT Standard Estimate Error z-Score Pr > z 0.5489 0.2853 1.9240 0.0543
When experimental units are naturally or artificially clustered, failure times of experimental units within a cluster are correlated. Lee, Wei, and Amato (1992) estimate the regression parameters in the Cox model by the maximum partial likelihood estimates under an independent working assumption and use a robust sandwich covariance matrix estimate to account for the intracluster dependence. A subset of data from the Diabetic Retinopathy Study (DRS) is used to illustrate the methodology as in Lin (1994).
The data consist of 197 diabetic patients who have a high risk of experiencing blindness in both eyes as defined by DRS criteria. One eye of each patient is treated with laser photocoagulation. The hypothesis of interest is whether the laser treatment delays the occurrence of blindness. Since juvenile and adult diabetes have very different courses, it is also desirable to examine how the age of onset of diabetes may affect the time of blindness. Since there are no biological differences between the left eye and the right eye, it is natural to assume a common baseline hazard function for the failure times of the left and the right eyes.
Each patient is a cluster that contributes two observations to the input data set, one for each eye. The following variables are in the input data set Blind :
ID , patient s identification
Time , failure time
Status , event indicator (0=censored and 1=uncensored)
Treatment , treatment received (1=laser photocoagulation and 0= otherwise )
DiabeticType , type of diabetes (0=juvenile onset with age of onset at 20 or under, and 1= adult onset with age of onset over 20)
data Blind; input ID Time Status DiabeticType Treatment @@; datalines; 5 46.23 0 1 1 5 46.23 0 1 0 14 42.50 0 0 1 14 31.30 1 0 0 16 42.27 0 0 1 16 42.27 0 0 0 25 20.60 0 0 1 25 20.60 0 0 0 29 38.77 0 0 1 29 0.30 1 0 0 46 65.23 0 0 1 46 54.27 1 0 0 49 63.50 0 0 1 49 10.80 1 0 0 56 23.17 0 0 1 56 23.17 0 0 0 61 1.47 0 0 1 61 1.47 0 0 0 71 58.07 0 1 1 71 13.83 1 1 0 100 46.43 1 1 1 100 48.53 0 1 0 112 44.40 0 1 1 112 7.90 1 1 0 120 39.57 0 1 1 120 39.57 0 1 0 127 30.83 1 1 1 127 38.57 1 1 0 133 66.27 0 1 1 133 14.10 1 1 0 150 20.17 1 0 1 150 6.90 1 0 0 167 58.43 0 1 1 167 41.40 1 1 0 176 58.20 0 0 1 176 58.20 0 0 0 185 57.43 0 1 1 185 57.43 0 1 0 190 56.03 0 0 1 190 56.03 0 0 0 202 67.53 0 0 1 202 67.53 0 0 0 214 61.40 0 1 1 214 0.60 1 1 0 220 10.27 1 0 1 220 1.63 1 0 0 243 66.20 0 0 1 243 66.20 0 0 0 255 5.67 1 0 1 255 13.83 1 0 0 264 58.83 0 0 1 264 29.97 1 0 0 266 60.27 0 1 1 266 26.37 1 1 0 284 5.77 1 1 1 284 1.33 1 1 0 295 5.90 1 0 1 295 35.53 1 0 0 300 25.63 1 1 1 300 21.90 1 1 0 302 33.90 1 0 1 302 14.80 1 0 0 315 1.73 1 0 1 315 6.20 1 0 0 324 46.90 0 1 1 324 22.00 1 1 0 328 31.13 0 0 1 328 31.13 0 0 0 335 30.20 1 0 1 335 22.00 1 0 0 342 70.90 0 0 1 342 70.90 0 0 0 349 25.80 1 1 1 349 13.87 1 1 0 357 5.73 1 1 1 357 48.30 1 1 0 368 53.43 0 0 1 368 53.43 0 0 0 385 1.90 1 0 1 385 51.10 0 0 0 396 9.90 1 1 1 396 9.90 1 1 0 405 34.20 0 0 1 405 34.20 0 0 0 409 46.73 0 1 1 409 2.67 1 1 0 419 18.73 0 1 1 419 13.83 1 1 0 429 32.03 0 1 1 429 4.27 1 1 0 433 69.87 0 1 1 433 13.90 1 1 0 445 66.80 0 0 1 445 66.80 0 0 0 454 64.73 0 0 1 454 64.73 0 0 0 468 1.70 1 0 1 468 1.70 1 0 0 480 1.77 1 0 1 480 43.03 1 0 0 485 29.03 0 0 1 485 29.03 0 0 0 491 56.57 0 1 1 491 56.57 0 1 0 503 8.30 1 1 1 503 8.30 1 1 0 515 21.57 0 1 1 515 18.43 1 1 0 522 31.57 0 0 1 522 31.57 0 0 0 538 31.63 0 1 1 538 31.63 1 1 0 547 39.77 0 1 1 547 39.77 0 1 0 550 18.70 1 0 1 550 6.53 1 0 0 554 18.90 0 0 1 554 18.90 0 0 0 557 56.80 0 0 1 557 22.23 1 0 0 561 55.60 0 0 1 561 14.00 1 0 0 568 42.17 1 0 1 568 42.17 1 0 0 572 10.70 0 0 1 572 5.33 1 0 0 576 66.33 0 0 1 576 59.80 1 0 0 581 52.33 0 1 1 581 5.83 1 1 0 606 58.17 0 0 1 606 2.17 1 0 0 610 14.30 1 0 1 610 48.43 1 0 0 615 25.83 0 0 1 615 25.83 0 0 0 618 45.40 0 0 1 618 45.40 0 0 0 624 47.60 0 0 1 624 47.60 0 0 0 631 13.33 1 0 1 631 9.60 1 0 0 636 42.10 0 0 1 636 42.10 0 0 0 645 39.93 0 0 1 645 39.93 0 0 0 653 14.27 1 0 1 653 7.60 1 0 0 662 34.57 1 0 1 662 1.80 1 0 0 664 65.80 0 0 1 664 4.30 1 0 0 683 4.10 1 1 1 683 12.20 1 1 0 687 60.93 0 0 1 687 60.93 0 0 0 701 57.20 0 0 1 701 57.20 0 0 0 706 38.07 0 1 1 706 12.73 1 1 0 717 54.10 0 1 1 717 54.10 1 1 0 722 59.27 0 0 1 722 9.40 1 0 0 731 21.57 1 0 1 731 9.90 1 0 0 740 54.10 0 0 1 740 54.10 0 0 0 749 50.47 0 1 1 749 50.47 0 1 0 757 46.17 0 0 1 757 46.17 0 0 0 760 46.30 0 0 1 760 46.30 0 0 0 766 38.83 0 1 1 766 38.83 0 1 0 769 44.60 0 0 1 769 44.60 0 0 0 772 43.07 0 0 1 772 43.07 0 0 0 778 26.23 1 1 1 778 40.03 0 1 0 780 41.60 0 0 1 780 18.03 1 0 0 793 38.07 0 1 1 793 38.07 0 1 0 800 65.23 0 1 1 800 65.23 0 1 0 804 7.07 1 1 1 804 66.77 0 1 0 810 13.77 1 0 1 810 13.77 1 0 0 815 9.63 0 1 1 815 9.63 1 1 0 832 46.23 0 0 1 832 46.23 0 0 0 834 45.73 0 0 1 834 1.50 1 0 0 838 33.63 1 1 1 838 33.63 1 1 0 857 40.17 0 0 1 857 40.17 0 0 0 866 63.33 1 1 1 866 27.60 1 1 0 887 38.47 1 1 1 887 1.63 1 1 0 903 55.23 0 1 1 903 55.23 0 1 0 910 52.77 0 1 1 910 25.30 1 1 0 920 57.17 0 0 1 920 46.20 1 0 0 925 9.87 0 1 1 925 1.70 1 1 0 931 57.90 0 0 1 931 57.90 0 0 0 936 5.90 0 0 1 936 5.90 0 0 0 945 32.20 0 0 1 945 32.20 0 0 0 949 10.33 1 0 1 949 0.83 1 0 0 952 6.13 1 0 1 952 50.90 0 0 0 962 43.67 0 0 1 962 25.93 1 0 0 964 38.30 0 0 1 964 38.30 0 0 0 971 38.77 0 1 1 971 19.40 1 1 0 978 38.07 0 0 1 978 21.97 1 0 0 983 38.30 0 0 1 983 38.30 0 0 0 987 26.20 1 0 1 987 70.03 0 0 0 1002 62.57 0 0 1 1002 18.03 1 0 0 1017 13.83 1 1 1 1017 1.57 1 1 0 1029 46.50 0 1 1 1029 13.37 1 1 0 1034 11.07 1 0 1 1034 1.97 1 0 0 1037 42.47 0 1 1 1037 22.20 1 1 0 1042 38.73 0 1 1 1042 38.73 0 1 0 1069 51.13 0 1 1 1069 51.13 0 1 0 1074 6.10 1 0 1 1074 46.50 0 0 0 1098 2.10 1 0 1 1098 11.30 1 0 0 1102 17.73 1 0 1 1102 42.30 0 0 0 1112 26.47 0 0 1 1112 26.47 0 0 0 1117 10.77 0 0 1 1117 10.77 0 0 0 1126 55.33 0 1 1 1126 55.33 0 1 0 1135 58.67 0 0 1 1135 58.67 0 0 0 1145 12.93 1 1 1 1145 4.97 1 1 0 1148 54.20 0 1 1 1148 26.47 1 1 0 1167 49.57 0 0 1 1167 49.57 0 0 0 1184 24.43 1 1 1 1184 9.87 1 1 0 1191 50.23 0 1 1 1191 50.23 0 1 0 1205 13.97 1 0 1 1205 30.40 1 0 0 1213 43.33 0 0 1 1213 43.33 1 0 0 1228 42.23 0 1 1 1228 42.23 0 1 0 1247 74.93 0 0 1 1247 74.93 0 0 0 1250 66.93 0 1 1 1250 66.93 0 1 0 1253 73.43 0 0 1 1253 73.43 0 0 0 1267 67.47 0 1 1 1267 38.57 1 1 0 1281 3.67 0 1 1 1281 3.67 1 1 0 1287 48.87 1 0 1 1287 67.03 0 0 0 1293 65.60 0 0 1 1293 65.60 0 0 0 1296 15.83 0 0 1 1296 15.83 1 0 0 1309 20.07 0 1 1 1309 8.83 1 1 0 1312 67.43 0 0 1 1312 67.43 0 0 0 1317 1.47 0 0 1 1317 1.47 0 0 0 1321 62.93 0 0 1 1321 22.13 1 0 0 1333 6.30 1 0 1 1333 56.97 0 0 0 1347 59.70 0 0 1 1347 18.93 1 0 0 1361 13.80 1 0 1 1361 19.00 1 0 0 1366 55.13 0 1 1 1366 55.13 0 1 0 1373 13.57 1 0 1 1373 5.43 1 0 0 1397 42.20 0 1 1 1397 42.20 0 1 0 1410 38.27 0 1 1 1410 38.27 0 1 0 1413 7.10 0 0 1 1413 7.10 1 0 0 1425 63.63 0 1 1 1425 26.17 1 1 0 1447 59.00 0 0 1 1447 24.73 1 0 0 1461 54.37 0 1 1 1461 54.37 0 1 0 1469 54.60 0 1 1 1469 10.97 1 1 0 1480 63.87 0 1 1 1480 21.10 1 1 0 1487 62.37 0 1 1 1487 43.70 1 1 0 1491 62.80 0 1 1 1491 62.80 0 1 0 1499 63.33 0 1 1 1499 14.37 1 1 0 1503 58.53 0 1 1 1503 58.53 0 1 0 1513 58.07 0 1 1 1513 58.07 0 1 0 1524 58.50 0 1 1 1524 58.50 0 1 0 1533 1.50 1 1 1 1533 14.37 0 1 0 1537 54.73 0 0 1 1537 38.40 1 0 0 1552 50.63 0 0 1 1552 2.83 1 0 0 1554 51.10 0 1 1 1554 51.10 0 1 0 1562 49.93 0 1 1 1562 6.57 1 1 0 1572 46.27 0 1 1 1572 46.27 1 1 0 1581 10.60 0 1 1 1581 10.60 0 1 0 1585 42.77 0 1 1 1585 42.77 0 1 0 1596 34.37 1 0 1 1596 42.27 0 0 0 1600 42.07 0 0 1 1600 42.07 0 0 0 1603 38.77 0 0 1 1603 38.77 0 0 0 1619 74.97 0 1 1 1619 61.83 1 1 0 1627 6.57 1 0 1 1627 66.97 0 0 0 1636 38.87 1 0 1 1636 68.30 0 0 0 1640 42.43 1 0 1 1640 46.63 1 0 0 1643 67.07 0 0 1 1643 67.07 0 0 0 1649 2.70 1 0 1 1649 2.70 0 0 0 1666 63.80 0 0 1 1666 63.80 0 0 0 1672 32.63 0 0 1 1672 32.63 0 0 0 1683 62.00 0 1 1 1683 62.00 0 1 0 1688 13.10 1 0 1 1688 54.80 0 0 0 1705 8.00 0 0 1 1705 8.00 0 0 0 1717 51.60 0 1 1 1717 42.33 1 1 0 1727 49.97 0 1 1 1727 2.90 1 1 0 1746 45.90 0 0 1 1746 1.43 1 0 0 1749 41.93 0 1 1 1749 41.93 0 1 0 ; run;
As a preliminary analysis, PROC FREQ is used to break down the numbers of blindness in the control and treated eyes.
proc freq data=Blind; table Treatment*Status; run;
The FREQ Procedure Table of Treatment by Status Treatment Status Frequency Percent Row Pct Col Pct 0 1 Total ---------+--------+--------+ 0 96 101 197 24.37 25.63 50.00 48.73 51.27 40.17 65.16 ---------+--------+--------+ 1 143 54 197 36.29 13.71 50.00 72.59 27.41 59.83 34.84 ---------+--------+--------+ Total 239 155 394 60.66 39.34 100.00
By the end of the study, 54 treated eyes and 101 untreated eyes have developed blindness (Output 54.9.1).
The analysis of Lee, Wei, and Amato (1992) can be carried out by the following PROC PHREG specification. The explanatory variables in this Cox model are Treatment , DiabeticType , and the Treatment — DiabeticType interaction. The COVS(AGGREGATE) is specified to compute the robust sandwich covariance matrix estimate.
proc phreg data=Blind covs(aggregate); model Time*Status(0)=Treatment DiabeticType Interaction; Interaction= Treatment * DiabeticType; id ID; run;
The robust standard error estimates are smaller than the model-based counterparts (Output 54.9.2), since the ratio of the robust standard error estimate relative to the model-based estimate is less than 1 for each variable. Laser photocoagulation appears to be effective ( p =0.0217) in delaying the occurrence of blindness. The effect is much more prominent for adult onset diabetes than for juvenile onset diabetes.
The PHREG Procedure Analysis of Maximum Likelihood Estimates Parameter Standard StdErr Hazard Variable DF Estimate Error Ratio Chi-Square Pr > ChiSq Ratio Treatment 1 0.42467 0.18497 0.850 5.2713 0.0217 0.654 DiabeticType 1 0.34084 0.19558 0.982 3.0371 0.0814 1.406 Interaction 1 0.84566 0.30353 0.865 7.7622 0.0053 0.429
The Mayo liver disease example of Lin,Wei,andYing(1993) is reproduced here to illustrate the checking of the functional form of a covariate and the assessment of the proportional hazards assumption. The data consist of 418 patients with primary biliary cirrhosis (PBC), among which 161 had died as of the date of data listing. A subset of the variables are saved in the SAS data set Liver . The data set contains the following variables:
Time , follow-up time in years
Status , event indicator with value 1 for death time and value 0 for censored time
Age , age in years from birth to study registration
Albumin , serum albumin level in gm/dl
Bilirubin , serum bilirubin level in mg/dl
Edema , edema presence
Protime , prothrombin time in seconds
data Liver; input Time Status Age Albumin Bilirubin Edema Protime @@; label Time="Follow-up Time in Years"; Time= Time / 365.25; datalines; 400 1 58.7652 2.60 14.5 1.0 12.2 4500 0 56.4463 4.14 1.1 0.0 10.6 1012 1 70.0726 3.48 1.4 0.5 12.0 1925 1 54.7406 2.54 1.8 0.5 10.3 1504 0 38.1054 3.53 3.4 0.0 10.9 2503 1 66.2587 3.98 0.8 0.0 11.0 1832 0 55.5346 4.09 1.0 0.0 9.7 2466 1 53.0568 4.00 0.3 0.0 11.0 2400 1 42.5079 3.08 3.2 0.0 11.0 51 1 70.5599 2.74 12.6 1.0 11.5 3762 1 53.7139 4.16 1.4 0.0 12.0 304 1 59.1376 3.52 3.6 0.0 13.6 3577 0 45.6893 3.85 0.7 0.0 10.6 1217 1 56.2218 2.27 0.8 1.0 11.0 3584 1 64.6461 3.87 0.8 0.0 11.0 3672 0 40.4435 3.66 0.7 0.0 10.8 769 1 52.1834 3.15 2.7 0.0 10.5 131 1 53.9302 2.80 11.4 1.0 12.4 4232 0 49.5606 3.56 0.7 0.5 11.0 1356 1 59.9535 3.51 5.1 0.0 13.0 3445 0 64.1889 3.83 0.6 0.0 11.4 673 1 56.2765 3.63 3.4 0.0 11.6 264 1 55.9671 2.94 17.4 1.0 11.7 4079 1 44.5202 4.00 2.1 0.0 9.9 4127 0 45.0732 4.10 0.7 0.0 11.3 1444 1 52.0246 3.68 5.2 0.0 9.9 77 1 54.4394 3.31 21.6 0.5 12.0 549 1 44.9473 3.23 17.2 1.0 13.0 4509 0 63.8768 3.78 0.7 0.0 10.6 321 1 41.3854 2.54 3.6 0.0 11.0 3839 1 41.5524 3.44 4.7 0.0 10.3 4523 0 53.9959 3.34 1.8 0.0 10.6 3170 1 51.2827 3.19 0.8 0.0 12.0 3933 0 52.0602 3.70 0.8 0.0 10.5 2847 1 48.6188 3.20 1.2 0.0 10.6 3611 0 56.4107 3.39 0.3 0.0 10.6 223 1 61.7276 3.01 7.1 1.0 12.0 3244 1 36.6270 3.53 3.3 0.0 11.0 2297 1 55.3922 3.00 0.7 0.0 10.6 4467 0 46.6694 3.34 1.3 0.0 11.0 1350 1 33.6345 3.26 6.8 0.0 11.7 4453 0 33.6947 3.54 2.1 0.0 11.0 4556 0 48.8706 3.64 1.1 0.0 10.6 3428 1 37.5825 3.55 3.3 1.0 11.7 4025 0 41.7933 3.93 0.6 0.0 10.9 2256 1 45.7988 2.84 5.7 0.0 12.7 2576 0 47.4278 3.65 0.5 0.0 9.8 4427 0 49.1362 3.70 1.9 0.0 11.0 708 1 61.1526 3.82 0.8 0.0 11.0 2598 1 53.5086 3.36 1.1 0.0 10.6 3853 1 52.0876 3.60 0.8 0.0 10.6 2386 1 50.5407 3.70 6.0 0.0 10.6 1000 1 67.4086 3.10 2.6 0.0 11.0 1434 1 39.1978 3.40 1.3 1.0 11.0 1360 1 65.7632 3.94 1.8 0.0 11.0 1847 1 33.6181 3.80 1.1 0.0 10.6 3282 1 53.5715 3.18 2.3 0.5 12.4 4459 0 44.5695 4.08 0.7 0.0 10.6 2224 1 40.3943 3.50 0.8 0.0 10.6 4365 0 58.3819 3.40 0.9 0.0 10.3 4256 0 43.8987 3.94 0.6 0.0 13.0 3090 1 60.7064 2.75 1.3 0.0 13.2 859 1 46.6283 3.12 22.5 1.0 11.6 1487 1 62.9076 3.50 2.1 0.0 11.0 3992 0 40.2026 3.60 1.2 0.0 10.0 4191 1 46.4531 3.70 1.4 0.0 11.0 2769 1 51.2882 3.91 1.1 0.0 10.0 4039 0 32.6133 4.09 0.7 0.0 10.6 1170 1 49.3388 3.46 20.0 0.5 12.4 3458 0 56.3997 4.64 0.6 0.0 10.6 4196 0 48.8460 3.57 1.2 0.0 11.5 4184 0 32.4928 3.54 0.5 0.0 10.0 4190 0 38.4942 3.60 0.7 0.0 11.0 1827 1 51.9206 3.99 8.4 0.0 11.0 1191 1 43.5181 2.53 17.1 0.5 11.5 71 1 51.9425 3.08 12.2 0.5 11.6 326 1 49.8261 3.41 6.6 0.5 12.1 1690 1 47.9452 3.02 6.3 0.0 10.6 3707 0 46.5161 4.24 0.8 0.0 10.9 890 1 67.4114 3.72 7.2 0.0 11.2 2540 1 63.2635 3.65 14.4 0.0 11.7 3574 1 67.3101 4.09 4.5 0.0 11.1 4050 0 56.0137 3.50 1.3 0.5 12.9 4032 0 55.8303 3.76 0.4 0.0 11.2 3358 1 47.2170 3.48 2.1 0.0 11.5 1657 1 52.7584 3.21 5.0 0.0 10.9 198 1 37.2786 4.40 1.1 0.0 10.7 2452 0 41.3936 4.06 0.6 0.5 12.0 1741 1 52.4435 3.65 2.0 0.0 11.4 2689 1 33.4757 4.22 1.6 0.0 11.0 460 1 45.6071 3.47 5.0 0.5 11.9 388 1 76.7091 3.13 1.4 1.0 12.2 3913 0 36.5339 3.67 1.3 0.0 11.1 750 1 53.9165 3.11 3.2 0.0 11.8 130 1 46.3901 2.64 17.4 1.0 11.7 3850 0 48.8460 3.70 1.0 0.0 10.4 611 1 71.8932 3.26 2.0 0.5 11.4 3823 0 28.8843 3.77 1.0 0.0 10.2 3820 0 48.4682 3.35 1.8 0.0 10.2 552 1 51.4689 3.00 2.3 0.0 12.0 3581 0 44.9500 3.60 0.9 0.0 10.4 3099 0 56.5695 3.97 0.9 0.0 10.1 110 1 48.9637 3.67 2.5 1.0 11.1 3086 1 43.0171 3.64 1.1 0.0 11.1 3092 0 34.0397 4.20 1.1 0.0 10.3 3222 1 68.5092 3.90 2.1 0.0 10.6 3388 0 62.5216 4.03 0.6 0.0 17.1 2583 1 50.3573 3.50 0.4 0.0 10.3 2504 0 44.0630 3.61 0.5 0.0 10.6 2105 1 38.9103 3.54 1.9 0.0 10.9 2350 0 41.1526 4.18 5.5 0.0 10.7 3445 1 55.4579 3.67 2.0 0.0 11.8 980 1 51.2334 3.74 6.7 0.0 11.1 3395 1 52.8268 4.30 3.2 0.0 11.7 3422 0 42.6393 4.19 0.7 0.0 10.3 3336 0 61.0705 3.63 3.0 0.5 9.9 1083 1 49.6564 3.11 6.5 0.0 11.0 2288 1 48.8542 3.30 3.5 0.0 10.2 515 1 54.2560 3.83 0.6 0.0 9.5 2033 0 35.1513 3.98 3.5 0.0 10.6 191 1 67.9069 3.08 1.3 1.0 13.2 3297 0 55.4360 4.13 0.6 0.0 10.7 971 1 45.8207 3.23 5.1 1.0 13.0 3069 0 52.8898 3.90 0.6 0.0 10.8 2468 0 47.1814 3.51 1.3 0.0 10.0 824 1 53.5989 3.12 1.2 0.0 11.1 3255 0 44.1040 4.08 0.5 0.0 10.0 1037 1 41.9493 2.89 16.2 0.0 12.6 3239 0 63.6140 3.87 0.9 0.0 9.7 1413 1 44.2272 3.43 17.4 0.0 11.5 850 1 62.0014 3.80 2.8 0.0 13.2 2944 0 40.5530 3.83 1.9 0.0 9.8 2796 1 62.6448 3.95 1.5 0.0 10.1 3149 0 42.3354 3.67 0.7 0.0 10.7 3150 0 42.9678 3.57 0.4 0.0 11.0 3098 0 55.9617 3.35 0.8 0.0 9.8 2990 0 62.8611 3.60 1.1 0.0 10.1 1297 1 51.2498 3.93 7.3 0.0 10.5 2106 0 46.7625 3.31 1.1 0.0 11.6 3059 0 54.0753 4.09 1.1 0.0 10.0 3050 0 47.0363 3.77 0.9 0.0 10.6 2419 1 55.7262 3.48 1.0 0.0 9.9 786 1 46.1027 3.60 2.9 0.0 11.0 943 1 52.2875 3.26 28.0 0.5 10.0 2976 0 51.2005 3.84 0.7 0.0 11.4 2615 0 33.8645 3.89 1.2 0.5 9.4 2995 0 75.0116 3.37 1.2 0.5 10.7 1427 1 30.8638 3.26 7.2 0.0 9.8 762 1 61.8042 3.79 3.0 0.5 9.9 2891 0 34.9870 3.63 1.0 0.0 10.0 2870 0 55.0418 3.03 0.9 0.0 9.4 1152 1 69.9411 3.01 2.3 0.0 10.9 2863 0 49.6044 3.85 0.5 0.0 11.1 140 1 69.3771 2.56 2.4 1.0 14.1 2666 0 43.5565 3.35 0.6 0.5 11.2 853 1 59.4086 3.52 25.5 0.0 11.5 2835 0 48.7584 3.42 0.6 0.0 10.0 2475 0 36.4928 3.37 3.4 0.0 11.2 1536 1 45.7604 3.46 2.5 0.0 10.1 2772 0 57.3717 3.62 0.6 0.0 10.5 2797 0 42.7433 3.56 2.3 0.0 9.6 186 1 58.8172 3.19 3.2 0.0 12.0 2055 1 53.4976 4.08 0.3 0.0 9.9 264 1 43.4141 3.34 8.5 0.5 13.3 1077 1 53.3060 3.45 4.0 0.0 11.3 2721 0 41.3552 3.26 5.7 0.0 9.5 1682 1 60.9582 3.86 0.9 0.0 10.3 2713 0 47.7536 3.80 0.4 0.0 9.2 1212 1 35.4908 4.22 1.3 0.0 10.1 2692 0 48.6626 3.61 1.2 0.0 9.0 2574 0 52.6680 4.52 0.5 0.0 10.1 2301 0 49.8700 3.34 1.3 0.0 9.8 2657 0 30.2752 3.42 3.0 0.0 9.8 2644 0 55.5674 3.85 0.5 0.0 9.7 2624 0 52.1533 3.80 0.8 0.0 10.1 1492 1 41.6099 3.56 3.2 0.0 10.1 2609 0 55.4524 4.01 0.9 0.0 10.4 2580 0 70.0041 4.08 0.6 0.0 10.2 2573 0 43.9425 3.83 1.8 0.0 9.9 2563 0 42.5681 4.38 4.7 0.0 10.4 2556 0 44.5695 3.58 1.4 0.0 10.3 2555 0 56.9446 3.69 0.6 0.0 9.9 2241 0 40.2601 3.73 0.5 0.0 10.1 974 1 37.6071 3.55 11.0 0.0 9.8 2527 0 48.3614 3.54 0.8 0.0 10.5 1576 1 70.8364 3.53 2.0 0.5 12.7 733 1 35.7919 3.43 14.0 0.0 11.5 2332 0 62.6229 3.48 0.7 0.0 11.0 2456 0 50.6475 3.63 1.3 0.0 9.9 2504 0 54.5270 3.93 2.3 0.0 10.2 216 1 52.6927 3.35 24.5 0.0 15.2 2443 0 52.7201 3.69 0.9 0.0 9.8 797 1 56.7721 3.19 10.8 0.0 10.4 2449 0 44.3970 4.30 1.5 0.0 9.1 2330 0 29.5551 3.90 3.7 0.0 11.5 2363 0 57.0404 3.36 1.4 0.0 11.6 2365 0 44.6270 3.97 0.6 0.0 10.1 2357 0 35.7974 2.90 0.7 0.0 9.6 1592 0 40.7173 3.43 2.1 0.0 10.2 2318 0 32.2327 3.55 4.7 0.0 9.9 2294 0 41.0924 3.20 0.6 0.0 10.8 2272 0 61.6400 3.80 0.5 0.0 10.0 2221 0 37.0568 4.04 0.5 0.0 9.9 2090 1 62.5791 3.74 0.7 0.0 10.2 2081 1 48.9774 3.55 2.5 0.0 10.3 2255 0 61.9904 4.07 0.6 0.0 11.0 2171 0 72.7721 3.33 0.6 0.5 10.1 904 1 61.2950 3.20 3.9 0.0 10.0 2216 0 52.6242 4.01 0.7 0.0 9.5 2224 0 49.7632 3.37 0.9 0.0 10.0 2195 0 52.9144 3.76 1.3 0.0 10.3 2176 0 47.2635 3.98 1.2 0.0 9.9 2178 0 50.2040 3.40 0.5 0.0 10.2 1786 1 69.3470 3.43 0.9 0.0 9.9 1080 1 41.1691 3.85 5.9 0.0 10.7 2168 0 59.1650 3.68 0.5 0.0 10.4 790 1 36.0794 3.31 11.4 0.0 10.8 2170 0 34.5955 3.89 0.5 0.0 10.1 2157 0 42.7132 4.17 1.6 0.0 9.6 1235 1 63.6304 3.22 3.8 0.0 10.6 2050 0 56.6297 3.65 0.9 0.0 9.7 597 1 46.2642 3.38 4.5 0.0 12.4 334 1 61.2430 2.43 14.1 1.0 11.0 1945 0 38.6201 3.66 1.0 0.0 9.7 2022 0 38.7707 3.66 0.7 0.0 10.1 1978 0 56.6954 3.70 0.5 0.0 9.6 999 1 58.9514 3.35 2.3 0.0 9.7 1967 0 36.9227 3.35 0.7 0.0 9.6 348 1 62.4148 3.05 4.5 0.5 11.4 1979 0 34.6092 3.41 3.3 0.0 11.5 1165 1 58.3354 1.96 3.4 0.0 10.7 1951 0 50.1821 3.02 0.4 0.0 10.6 1932 0 42.6858 3.06 0.9 0.0 9.8 1776 0 34.3792 3.35 0.9 0.0 11.2 1882 0 33.1828 4.16 13.0 0.0 11.9 1908 0 38.3819 3.79 1.5 0.0 9.7 1882 0 59.7618 2.95 1.6 0.0 10.1 1874 0 66.4120 3.35 0.6 0.5 9.8 694 1 46.7899 2.94 0.8 0.0 11.2 1831 0 56.0794 3.72 0.4 0.0 10.1 837 0 41.3744 3.62 4.4 0.0 9.8 1810 0 64.5722 2.97 1.9 0.0 9.9 930 1 67.4880 2.81 8.0 0.0 10.0 1690 1 44.8296 3.22 3.9 0.0 9.6 1790 0 45.7714 3.65 0.6 0.0 9.6 1435 0 32.9500 3.77 2.1 0.0 10.1 732 0 41.2211 2.83 6.1 0.0 10.0 1785 0 55.4168 3.51 0.8 0.0 10.0 1783 0 47.9808 3.20 1.3 0.0 10.6 1769 0 40.7912 3.36 0.6 0.0 10.9 1457 0 56.9747 3.61 0.5 0.0 9.9 1770 0 68.4627 3.35 1.1 0.0 10.0 1765 0 78.4394 3.03 7.1 0.0 11.2 737 0 39.8576 3.75 3.1 0.0 10.0 1735 0 35.3101 3.85 0.7 0.0 10.3 1701 0 31.4442 3.74 1.1 0.0 9.7 1614 0 58.2642 4.23 0.5 0.0 10.6 1702 0 51.4880 3.44 1.1 0.0 9.6 1615 0 59.9699 2.97 3.1 0.0 9.8 1656 0 74.5243 3.59 5.6 0.0 10.9 1677 0 52.3641 3.14 3.2 0.0 9.5 1666 0 42.7871 3.06 2.8 0.0 9.5 1301 0 34.8747 3.57 1.1 0.5 11.4 1542 0 44.1396 3.12 3.4 0.0 11.2 1084 0 46.3819 3.20 3.5 0.0 10.0 1614 0 56.3094 3.32 0.5 0.0 10.2 179 1 70.9076 2.33 6.6 1.0 12.1 1191 1 55.3949 2.75 6.4 0.5 11.0 1363 0 45.0842 3.50 3.6 0.0 10.1 1568 0 26.2779 3.74 1.0 0.0 10.2 1569 0 50.4723 3.50 1.0 0.0 9.7 1525 0 38.3984 2.93 0.5 0.0 9.8 1558 0 47.4196 3.46 2.2 0.0 9.6 1447 0 47.9808 3.07 1.6 0.0 9.6 1349 0 38.3162 3.77 2.2 0.0 9.5 1481 0 50.1081 3.85 1.0 0.0 10.7 1434 0 35.0883 3.56 1.0 0.5 9.8 1420 0 32.5038 3.70 5.6 0.0 9.9 1433 0 56.1533 3.77 0.5 0.0 9.8 1412 0 46.1547 3.69 1.6 0.0 9.6 41 1 65.8836 2.10 17.9 1.0 12.9 1455 0 33.9439 3.52 1.3 0.0 9.5 1030 0 62.8611 3.99 1.1 0.0 9.6 1418 0 48.5640 3.44 1.3 0.0 9.5 1401 0 46.3491 3.48 0.8 0.0 10.0 1408 0 38.8528 3.36 2.0 0.0 9.8 1234 0 58.6475 3.46 6.4 0.0 10.1 1067 0 48.9363 3.89 8.7 0.5 9.6 799 1 67.5729 3.99 4.0 0.5 9.8 1363 0 65.9849 3.57 1.4 0.0 9.8 901 0 40.9008 3.18 3.2 0.0 9.9 1329 0 50.2450 3.73 8.6 0.0 11.2 1320 0 57.1964 2.98 8.5 1.0 12.3 1302 0 60.5366 3.07 6.6 0.0 10.9 877 0 35.3511 3.83 2.4 0.0 10.3 1321 0 31.3812 3.31 0.8 0.0 10.9 533 0 55.9863 3.43 1.2 0.0 11.3 1300 0 52.7255 3.37 1.1 0.0 10.2 1293 0 38.0917 3.76 2.4 0.0 10.8 207 1 58.1711 2.23 5.2 0.0 12.3 1295 0 45.2101 3.57 1.0 0.0 10.5 1271 0 37.7988 3.95 0.7 0.0 10.6 1250 0 60.6598 3.25 1.0 0.0 10.6 1230 0 35.5346 3.93 0.5 0.0 10.8 1216 0 43.0664 3.61 2.9 0.0 10.6 1216 0 56.3915 3.45 0.6 0.0 10.7 1149 0 30.5736 3.56 0.8 0.0 10.5 1153 0 61.1828 3.58 0.4 0.0 10.4 994 0 58.2998 2.75 0.4 0.0 10.8 939 0 62.3326 3.35 1.7 0.0 10.2 839 0 37.9986 3.16 2.0 0.0 10.5 788 0 33.1526 3.79 6.4 0.0 10.8 4062 0 60.0000 3.65 0.7 0.0 11.0 3561 1 65.0000 3.04 1.4 0.5 12.1 2844 0 54.0000 4.03 0.7 0.0 9.8 2071 1 75.0000 3.96 0.7 0.5 11.3 3030 0 62.0000 2.48 0.8 0.0 10.0 1680 0 43.0000 3.68 0.7 0.0 9.5 41 1 46.0000 2.93 5.0 0.0 10.4 2403 0 44.0000 3.81 0.4 0.5 10.5 1170 0 61.0000 3.41 1.3 0.5 10.9 2011 1 64.0000 3.69 1.1 0.0 10.5 3523 0 40.0000 4.04 0.6 0.0 11.2 3468 0 63.0000 3.94 0.6 0.0 11.5 4795 0 34.0000 3.24 1.8 0.0 18.0 1236 0 52.0000 3.42 1.5 0.0 10.3 4214 0 49.0000 3.99 1.2 0.0 11.2 2111 1 54.0000 3.60 1.0 0.0 12.1 1462 1 63.0000 3.40 0.7 0.0 10.1 1746 1 54.0000 3.63 3.5 0.0 10.3 94 1 46.0000 3.56 3.1 0.5 13.6 785 1 53.0000 2.87 12.6 0.0 11.8 1518 1 56.0000 3.92 2.8 0.0 10.6 466 1 56.0000 3.51 7.1 0.0 11.8 3527 0 55.0000 4.15 0.6 0.0 10.1 2635 0 65.0000 3.34 2.1 0.0 10.1 2286 1 56.0000 3.64 1.8 0.0 10.0 791 1 47.0000 3.42 16.0 0.0 13.8 3492 0 60.0000 4.38 0.6 0.0 10.6 3495 0 53.0000 4.19 5.4 0.0 11.2 111 1 54.0000 3.29 9.0 0.0 13.1 3231 0 50.0000 4.01 0.9 0.0 10.5 625 1 48.0000 2.84 11.1 0.0 12.2 3157 0 36.0000 3.76 8.9 0.0 10.6 3021 0 48.0000 3.76 0.5 0.0 10.1 559 1 70.0000 3.81 0.6 0.5 11.0 2812 1 51.0000 3.92 3.4 0.0 9.3 2834 0 52.0000 3.14 0.9 0.0 12.3 2855 0 54.0000 3.82 1.4 0.0 10.3 662 1 48.0000 4.10 2.1 0.0 9.0 727 1 66.0000 3.40 15.0 0.0 11.1 2716 0 53.0000 4.19 0.6 0.0 9.9 2698 0 62.0000 3.40 1.3 0.0 10.6 990 1 59.0000 3.12 1.3 0.0 9.6 2338 0 39.0000 3.75 1.6 0.0 10.4 1616 1 67.0000 3.26 2.2 0.5 11.1 2563 0 58.0000 3.46 3.0 0.0 10.4 2537 0 64.0000 3.49 0.8 0.0 10.3 2534 0 46.0000 2.89 0.8 0.0 10.6 778 1 64.0000 3.15 1.8 0.0 10.4 617 0 41.0000 2.31 5.5 0.0 10.4 2267 0 49.0000 3.04 18.0 0.0 9.7 2249 0 44.0000 3.50 0.6 0.0 9.9 359 1 59.0000 3.35 2.7 0.0 11.5 1925 0 63.0000 3.58 0.9 0.0 10.0 249 1 61.0000 3.01 1.3 0.0 10.7 2202 0 64.0000 3.49 1.1 0.0 9.8 43 1 49.0000 2.77 13.8 0.0 11.1 1197 1 42.0000 4.52 4.4 0.0 10.8 1095 1 50.0000 3.36 16.0 0.0 10.0 489 1 51.0000 3.52 7.3 0.5 11.1 2149 0 37.0000 3.55 0.6 0.0 10.3 2103 0 62.0000 3.29 0.7 0.0 9.8 1980 0 51.0000 3.10 0.7 0.0 10.6 1347 0 52.0000 3.24 1.7 0.0 10.5 1478 1 44.0000 3.63 9.5 0.0 10.2 1987 0 33.0000 3.76 2.2 0.0 9.9 1168 1 60.0000 3.62 1.8 0.5 9.9 597 1 63.0000 2.73 3.3 0.5 11.1 1725 0 33.0000 4.08 2.9 0.0 10.5 1899 0 41.0000 3.66 1.7 0.0 11.0 221 1 51.0000 2.58 14.0 0.0 11.6 1022 0 37.0000 3.00 0.8 0.5 10.8 1639 0 59.0000 3.40 1.3 0.0 9.7 1635 0 55.0000 2.93 0.7 0.0 10.6 1654 0 54.0000 2.38 1.7 0.0 9.8 1653 0 49.0000 3.00 13.6 0.5 9.9 1560 0 40.0000 3.50 0.9 0.0 10.9 1581 0 67.0000 3.06 0.7 0.0 10.0 1419 0 68.0000 3.15 3.0 0.0 10.0 1443 0 41.0000 2.80 1.2 0.0 11.0 1368 0 69.0000 3.03 0.4 0.0 10.9 193 1 52.0000 2.96 0.7 0.5 9.9 1367 0 57.0000 3.07 2.0 0.5 12.1 1329 0 36.0000 3.98 1.4 0.0 11.0 1343 0 50.0000 3.48 1.6 0.0 10.2 1328 0 64.0000 3.65 0.5 0.0 10.2 1375 0 62.0000 3.49 7.3 0.0 10.9 1260 0 42.0000 2.82 8.1 0.0 10.4 1223 0 44.0000 3.34 0.5 0.0 10.6 935 1 69.0000 3.19 4.2 0.0 11.1 943 0 52.0000 3.01 0.8 0.0 10.6 1141 0 66.0000 3.33 2.5 0.0 10.8 1092 0 40.0000 3.60 4.6 0.0 10.4 1150 0 52.0000 3.64 1.0 0.0 10.6 703 1 46.0000 2.68 4.5 0.0 11.5 1129 0 54.0000 3.69 1.1 0.0 10.8 1086 0 51.0000 3.17 1.9 0.5 10.7 1067 0 43.0000 3.73 0.7 0.0 10.8 1072 0 39.0000 3.81 1.5 0.0 10.8 1119 0 51.0000 3.57 0.6 0.0 10.6 1097 0 67.0000 3.58 1.0 0.0 10.8 989 0 35.0000 3.23 0.7 0.0 10.8 681 1 67.0000 2.96 1.2 0.0 10.9 1103 0 39.0000 3.83 0.9 0.0 11.2 1055 0 57.0000 3.42 1.6 0.0 9.9 691 0 58.0000 3.75 0.8 0.0 10.4 976 0 53.0000 3.29 0.7 0.0 10.6 ; run;
Consider fitting a Cox model for the survival time of the PCB patients with covariates Bilirubin , log( Protime ), log( Albumin ), Age and Edema . The log tranform, which is often applied to blood chemistry measurements, is deliberately not employed for Bilirubin . It is of interest to assess the functional form of the variable Bilirubin in the Cox model.
ods html; ods graphics on; proc phreg data=Liver; model Time*Status(0)=Bilirubin logProtime logAlbumin Age Edema; logProtime=log(Protime); logAlbumin=log(Albumin); assess var=(Bilirubin) / resample; run; ods graphics off; ods html close;
The ASSESS statement creates a plot of the cumulative martingale residuals against the values of the covariate Bilirubin , which is specified in the VAR= option. The RESAMPLE option computes the p -value of a Kolmogorov-type supremum test based on a sample of 1,000 simulated residual patterns.
Parameter estimates of the model fit are shown in Output 54.10.1. The plot in Output 54.10.2 displays the observed cumulative martingale residual process for Bilirubin together with 20 simulated realizations from the null distribution. This graphical display is requested by specifying the experimental ODS GRAPHICS statement and the experimental ASSESS statement. For general information about ODS graphics, see Chapter 15, Statistical Graphics Using ODS. For specific information about the graphics available in the PHREG procedure, see the section ODS Graphics on page 3271. It is obvious that the observed process is atypical compared to the simulated realizations. Also, none of the 1,000 simulated realizations has an absolute maximum exceeding that of the observed cumulative martingale residual process. Both the graphical and numerical results indicate that a transform is deemed necessary for Bilirubin in the model.
The PHREG Procedure Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio Bilirubin 1 0.11733 0.01298 81.7567 <.0001 1.124 logProtime 1 2.77581 0.71482 15.0794 0.0001 16.052 logAlbumin 1 23.17195 0.62945 25.3939 <.0001 0.042 Age 1 0.03779 0.00805 22.0288 <.0001 1.039 Edema 1 0.84772 0.28125 9.0850 0.0026 2.334
The cumulative martingale residual plots in Output 54.10.3 provide guidance in suggesting a more appropriate functional form for a covariate. The four curves were created from simple forms of misspecification using 1,000 simulated times from a exponential model with 20% censoring. The true and fitted models are shown in Table 54.3.
Plot | Data | Fitted Model |
---|---|---|
(a) | log( X ) | X |
(b) | { X, X 2 } | X |
(c) | { X, X 2 , X 3 } | { X, X 2 } |
(d) | I ( X > 5) | X |
The curve of observed cumulative martingale residuals in Output 54.10.2 most resembles the behavior of the curve in plot (a) of Output 54.10.3, indicating that log( Bilirubin ) might be a more appropriate term in the model than Bilirubin .
Next, the analysis of the natural history of the PBC is repeated with log( Bilirubin )replacing Bilirubin , and the functional form of log( Bilirubin ) is assessed. Also assessed is the proportional hazards assumption for the Cox model.
ods html; ods graphics on; proc phreg data=Liver; model Time*Status(0)=logBilirubin logProtime logAlbumin Age Edema; logBilirubin=log(Bilirubin); logProtime=log(Protime); logAlbumin=log(Albumin); assess var=(logBilirubin) ph / crpanel resample seed=19; run; ods graphics off; ods html close;
The SEED= option specifies a integer seed for generating random numbers. The CRPANEL option in the ASSESS statement requests a panel of four plots. Each plot displays the observed cumulative martingale residual process along with two simulated realizations. The PH option checks the proportional hazards assumption of the model by plotting the observed standardized score process with 20 simulated realizations for each covariate in the model.
Output 54.10.4 displays the parameter estimates of the fitted model. The cumulative martingale residual plots in Output 54.10.5 and Output 54.10.6 show that the observed martingale residual process is more typical of the simulated realizations. The p -value for the Kolmogorov-type supremum test based on 1,000 simulations is 0.052, indicating that the log transform is a much improved functional form for Bilirubin .
The PHREG Procedure Analysis of Maximum Likelihood Estimates Parameter Standard Hazard Variable DF Estimate Error Chi-Square Pr > ChiSq Ratio logBilirubin 1 0.87072 0.08263 111.0484 <.0001 2.389 logProtime 1 2.37789 0.76674 9.6181 0.0019 10.782 logAlbumin 1 2.53264 0.64819 15.2664 <.0001 0.079 Age 1 0.03940 0.00765 26.5306 <.0001 1.040 Edema 1 0.85934 0.27114 10.0447 0.0015 2.362
Output 54.10.7 and Output 54.10.8 display the results of proportional hazards assumption assessment for log(Bilirubin) and log(Protime) respectively. The latter plot reveals nonproportional hazards for log(Protime).
Plots for log( Albumin ), Age , and Edema are not shown here. The Kolmogorov-type supremum test results for all the covariates are shown in Output 54.10.9. In addition to log( Protime ), the proportional hazards assumption appears to be violated for Edema .
Supremum Test for Proportionals Hazards Assumption Maximum Absolute Pr > Variable Value Replications Seed MaxAbsVal logBilirubin 1.0880 1000 19 0.1480 logProtime 1.7243 1000 19 0.0010 logAlbumin 0.8443 1000 19 0.4390 Age 0.7387 1000 19 0.4780 Edema 1.4350 1000 19 0.0310