|
|
|
||||
|
|
|||||
The material in this chapter is based on the M215 (Fall 2001) Final Project Report by Dong Ding, Weihua Huang, Luohua Jiang, Liyuan Xiong and Kefei Zhou. We thank them for permission to adapt and distribute this page via our web site. This chapter is all done using the SAS macro program for the additive hazard model provided from the author's website. The page is revised on May 4, 2009.
Example 10.1 on page 309 using the breast cancer data set described in Section 1.5. We have created a data step for it and you can download it from here.
%include 'c:\sasmacros\additive.sas';
proc sort data = sec1_5;
by time;
run;
data bcnew;
set sec1_5;
positive = (group=2);
drop group;
run;
proc iml;
option={y, n, y, n, n};
contr={1 -1};
effects={'positive'};
timeunit={'month'};
%additive (bcnew,0.05, timeunit, effects, option, contr, betab, testb);
quit;
proc print data = betab (obs=10) noobs; run;
COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9
19 0.02778 -0.02778 0.027778 0.02778 -0.026666 -0.08222 0.08222 0.02667
22 0.02778 0.08333 0.027778 0.11453 -0.026666 -0.14114 0.08222 0.30781
23 0.02778 0.20833 0.027778 0.16954 -0.026666 -0.12395 0.08222 0.54062
25 0.05635 0.17976 0.039849 0.17193 -0.021753 -0.15721 0.13445 0.51673
30 0.08576 0.15035 0.049528 0.17442 -0.011311 -0.19151 0.18283 0.49221
34 0.11606 0.12005 0.058063 0.17704 0.002264 -0.22694 0.22986 0.46703
37 0.14731 0.08880 0.065938 0.17977 0.018078 -0.26355 0.27655 0.44115
38 0.14731 0.23165 0.065938 0.22962 0.018078 -0.21840 0.27655 0.68171
42 0.14731 0.39832 0.065938 0.28373 0.018078 -0.15779 0.27655 0.95443
46 0.17957 0.36606 0.073406 0.28556 0.035699 -0.19363 0.32344 0.92575
Notice:
Col1: time
Col2: beta_0
col3: beta_1
col4: standard error for beta_0
col5: standard error for beta_1
col6: lower confidence limit for beta_0
col7: lower confidence limit for beta_1
col8: upper confidence limit for beta_0
col9: upper confidence limit for beta_1
title "Figure 10.1";
axis1 label=(j=c 'Months') order=(0 to 100 by 20) minor = none;
axis2 label=(a=90 j=c 'Estimated Baseline Cumulative Hazard Rate for Immunoperoxidase Negative Patients')
order=(0.0 to 1.0 by 0.2) minor = none;
symbol1 interpol=stepjr c=black l=1 value=none;
symbol2 interpol=stepjr c=blue l=3 value=none;
symbol3 interpol=stepjr c=red l=3 value=none;
proc gplot data=betab;
plot col2*col1 col6*col1 col8*col1/overlay haxis=axis1 vaxis=axis2;
run;
quit;

title "Figure 10.2";
axis1 label=(j=c 'Months') order=(0 to 100 by 20) minor=none;
axis2 label=(a=90 j=c 'Estimated Cumulative Excess Risk for Immunoperosidase Positive Patients')
order=(-0.5 to 2.0 by 0.5) minor=none;
proc gplot data=betab;
plot col3*col1 col7*col1 col9*col1/overlay haxis=axis1 vaxis=axis2;
run;
quit;

Example 10.2 on page 311 using data set larynx described in section 1.8.
data larynx1;
length time death z1-z3 age 8.;
set larynx;
z1=(stage=2);
z2=(stage=3);
z3=(stage=4);
age=age-64.11;
keep time death z1 z2 z3 age;
run;
proc sort data = larynx1;
by time;
run;
proc iml;
option={y, n, y, n, n};
contrast={0 1 -1 0 0, 0 0 1 -1 0};
effects={'z1', 'z2' ,'z3', 'age'};
timeunit={'Years'};
%additive (larynx1, 0.05, timeunit, effects, option, contrast, beta, test);
quit;The data set beta created above has many columns. It follows the following pattern.
Col1: time
Col2-7: beta_0-beta_4
col7-11: standard errors for beta_0-beta_4
col2-16: lower confidence limit for beta_0-beta_4
col7-21: upper confidence limit for beta_0-beta_4
title "Figure 10.3";
axis1 label=(j=c 'Years') minor=none;
axis2 label=(a=90 j=c 'Estimated Baseline Cumulative Hazard Rate for Stage I Patients')
minor = none;
proc gplot data=beta;
plot col2*col1 col12*col1 col17*col1/overlay haxis=axis1 vaxis=axis2;
run;
quit;

title "Figure 10.4";
axis1 label=(j=c 'Years') minor=none;
axis2 label=(a=90 j=c 'Estimated Cumulative Excess Risk of Stage II Patients')
order=(-0.4 to 0.6 by 0.2) minor = none;
proc gplot data=beta;
plot col3*col1 col13*col1 col18*col1/overlay haxis=axis1 vaxis=axis2;
run;
quit;

title "Figure 10.5";
axis1 label=(j=c 'Years') minor=none;
axis2 label=(a=90 j=c 'Estimated Cumulative Excess Risk of Stage III Patients')
order=(-0.2 to 0.8 by 0.2) minor=none;
proc gplot data=beta;
plot col4*col1 col14*col1 col19*col1/overlay haxis=axis1 vaxis=axis2;
run;
quit;

title "Figure 10.6";
axis1 label=(j=c 'Years') minor = none;
axis2 label=(a=90 j=c 'Estimated Cumulative Excess Risk of Stage IV Patients')
order=(-0.5 to 3.5 by 0.5) minor = none;
proc gplot data=beta;
plot col5*col1 col15*col1 col20*col1/overlay haxis=axis1 vaxis=axis2;
run;
quit;

title "Figure 10.7";
axis1 label=(j=c 'Years') minor = none;
axis2 label=(a=90 j=c 'Estimated Cumulative Excess Risk Due to Age')
order=(-0.02 to 0.04 by 0.02) minor = none;
proc gplot data=beta;
plot col6*col1 col16*col1 col21*col1/overlay haxis=axis1 vaxis=axis2;
run;
quit;

Table in the middle of page 323 of Example 10.2 (continued).
options nocenter;
proc iml;
option={ n, y, n, n, y};
contrast={0 1 -1 0 0, 0 0 1 -1 0};
effects={'z1', 'z2' ,'z3', 'age'};
timeunit={'Years'};
%additive (larynx1, 0.05, timeunit, effects, option, contrast, beta, test);
quit;
Additive Hazards Model
No missing data: all observations were used in analysis.
90 observations used.
Estimates are restricted to the time interval 0 to 4.30
Global Test
Chi-Square d.f p-value
10.9613 4 0.0270
Analysis of Variance
Effect Chi-Square d.f p-value
z1 0.1456 1 0.7027
z2 3.0062 1 0.0829
z3 8.4655 1 0.0036
age 0.2333 1 0.6291
Test of Linear Combinations
Contrast Matrix 0 1 -1 0 0
0 0 1 -1 0
Chi-Square d.f p-value
6.8131 2 0.0332
title "beta_1=beta_2";
proc iml;
option={ n, y, n, n, y};
contrast={0 1 -1 0 0};
effects={'z1', 'z2' ,'z3', 'age'};
timeunit={'Years'};
%additive (larynx1, 0.05, timeunit, effects, option, contrast, beta, test);
quit;
Contrast Matrix 0 1 -1 0 0
Chi-Square d.f p-value
1.5884 1 0.2076
title "beta_1=beta_3";
proc iml;
option={ n, y, n, n, y};
contrast={0 1 0 -1 0};
effects={'z1', 'z2' ,'z3', 'age'};
timeunit={'Years'};
%additive (larynx1, 0.05, timeunit, effects, option, contrast, beta, test);
quit;
Contrast Matrix 0 1 0 -1 0
Chi-Square d.f p-value
6.9390 1 0.0084
title "beta_2=beta_3";
proc iml;
option={ n, y, n, n, y};
contrast={0 0 1 -1 0};
effects={'z1', 'z2' ,'z3', 'age'};
timeunit={'Years'};
%additive (larynx1, 0.05, timeunit, effects, option, contrast, beta, test);
quit;
Contrast Matrix 0 0 1 -1 0
Chi-Square d.f p-value
3.4238 1 0.0643
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services