Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The PHREG Procedure

Example 44.5: Time-Dependent Repeated Measurements

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 20 variables:

The following SAS statements create the data set TUMOR:

   data Tumor;
      infile datalines missover;
      input ID Time Dead Dose P1-P16;
      label ID='Subject ID';
      datalines;
    1 47 1  1.0  0  1  5  6  8 10 10 10 10
    2 71 1  1.0  0  0  0  0  0  0  0  0  0  1  1  1  1 1 1 1
    3 81 0  1.0  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 0
    5 81 0  1.0  0  0  0  0  0  0  0  0  0  0  0  0  0 0 0 0
    6 65 1  1.0  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 0
    8 69 0  1.0  0  0  0  0  0  0  0  0  0  0  0  0  0 0 0
    9 67 1  1.0  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 0
   11 37 1  1.0  9  9  9  9
   12 81 0  1.0  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  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 0
   15 81 0  1.0  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  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  0
   18 38 0  2.5  5 13 13 14
   19 54 0  2.5  2  5  6  6  6  6  6  6  6  6  6  6  6
   20 51 1  2.5 15 15 15 15 16 16 17 17 17 17 17 17
   21 47 1  2.5 13 20 20 20 20 20 20 20 20
   22 27 1  2.5 22
   23 41 1  2.5  6 13 13 13 13
   24 49 1  2.5  0  3  3  3  3  3  3  3  3  3
   25 53 0  2.5  0  0  0  1  1  1  1  1  1  1  1  1  1
   26 50 1  2.5  0  0  0  2  3  4  6  6  6  6  6
   27 37 1  2.5  3 14 15 15
   28 49 1  2.5  2  3  3  3  3  3  4  4  4  4
   29 46 1  2.5  4  6  6  7  9  9  9  9
   30 48 0  2.5 15 26 26 26 26 26 26 26 26
   31 54 0 10.0 12 13 14 15 15 15 15 15 15 15 15 15 15
   32 37 1 10.0 12 16 16 17
   33 53 1 10.0  3  6  6  6  6  6  6  6  6  6  6  6  6
   34 45 1 10.0  4 10 12 15 20 20 20
   35 53 0 10.0  6  8 10 13 13 13 15 15 15 15 15 15 20
   36 49 1 10.0  0  1  2  2  2  2  2  2  2  2
   37 39 0 10.0  7  8  8  8
   38 27 1 10.0 17
   39 49 1 10.0  0  2  6  9 14 14 14 14 14 14
   40 43 1 10.0 14 18 18 20 20 20
   41 28 0 10.0  8
   42 34 1 10.0 11 18 18
   43 45 1 10.0 10 12 12 16 16 16 16
   44 37 1 10.0  0  0  1  1
   45 43 1 10.0  9 19 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{15} P1-P15;
      array ll{16} l1-l16;
      l1 =27;
      l2 =33;
      l3 =34;
      l4 =37;
      l5 =41;
      l6 =43;
      l7 =45;
      l8 =46;
      l9 =47;
      l10=49;
      l11=50;
      l12=51;
      l13=53;
      l14=65;
      l15=67;
      l16=71;
      if Time <  l1  then NPap=0;
      else if time >= l16 then NPap=p16;
      else
         do i=1 to 15;
            if ll[i] <= Time < ll[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 33 and 37; at week 33, the animal had only one papilloma, while at week 37, it had six papillomas. Results of the analysis are shown in Output 44.5.1.

Output 44.5.1: Cox Regression Analysis on the Survival of Rodents

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
Total Event Censored Percent
Censored
45 25 20 44.44

Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.

Model Fit Statistics
Criterion Without
Covariates
With
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
Variable DF Parameter
Estimate
Standard
Error
Wald
Chi-Square
Pr > ChiSq Hazard
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:

For example, six observations are generated for the rodent that died at week 47 and that had no papilloma at week 27, one papilloma at week 33, 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,33,1,0), (33,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);
      retain l1 27 l2 33 l3 34 l4 37 l5 41 l6 43 l7 45 l8 46
             l9 47 l10 49 l11 50 l12 51 l13 53 l14 65 l15 67
             l16 71;
      array pp P1-P15;
      array qq P2-P16;
      array ll l1-l16;
      set Tumor;
      T1 = 0;
      T2 = 0;
      Status = 0;
      if ( Time = l1 ) then do;
         T2= l1;
         NPap= p1;
         Status= Dead;
         output;
      end;
      else do over pp;
         if ( ll = Time ) then do;
            T2= Time;
            NPap= pp;
            Status= Dead;
            output;
         end;
         else if (ll < Time ) then do;
            if (pp ^= qq) then do;
               if qq = . then T2= Time;
               else           T2= ll;
               NPap= pp;
               Status= 0;
               output;
               T1= T2;
            end;
         end;
      end;
      if ( Time >= l16 ) then do;
         T2= Time;
         NPap= p16;
         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 44.8.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 44.5.2 and Output 44.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.

Output 44.5.2: Plot of DFBETA Statistic for DOSE versus Subject Number
phrx8b.gif (3742 bytes)

Output 44.5.3: Plot of DFBETA Statistic for NPAP versus Subject Number
phrx8c.gif (4046 bytes)

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.