Example 49.6: Survivor Function Estimates for Specific Covariate Values
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 49.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;
Output 49.6.1: Survivor Function Estimates for LogBUN=1.0 and HGB=10.0
Obs |
LogBUN |
HGB |
Time |
S |
S_lower |
S_upper |
1 |
1.0000 |
10.0000 |
0.00 |
1.00000 |
. |
. |
2 |
1.0000 |
10.0000 |
1.25 |
0.98622 |
0.96600 |
1.00000 |
3 |
1.0000 |
10.0000 |
2.00 |
0.96438 |
0.92775 |
1.00000 |
4 |
1.0000 |
10.0000 |
3.00 |
0.95687 |
0.91513 |
1.00000 |
5 |
1.0000 |
10.0000 |
5.00 |
0.93966 |
0.88745 |
0.99494 |
6 |
1.0000 |
10.0000 |
6.00 |
0.90211 |
0.83101 |
0.97929 |
7 |
1.0000 |
10.0000 |
7.00 |
0.87192 |
0.78793 |
0.96487 |
8 |
1.0000 |
10.0000 |
9.00 |
0.86073 |
0.77215 |
0.95947 |
9 |
1.0000 |
10.0000 |
11.00 |
0.80252 |
0.69458 |
0.92725 |
10 |
1.0000 |
10.0000 |
13.00 |
0.78969 |
0.67751 |
0.92044 |
11 |
1.0000 |
10.0000 |
14.00 |
0.77554 |
0.65896 |
0.91274 |
12 |
1.0000 |
10.0000 |
15.00 |
0.76116 |
0.64048 |
0.90458 |
13 |
1.0000 |
10.0000 |
16.00 |
0.73142 |
0.60343 |
0.88654 |
14 |
1.0000 |
10.0000 |
17.00 |
0.69988 |
0.56494 |
0.86706 |
15 |
1.0000 |
10.0000 |
18.00 |
0.68345 |
0.54525 |
0.85667 |
16 |
1.0000 |
10.0000 |
19.00 |
0.64951 |
0.50561 |
0.83438 |
17 |
1.0000 |
10.0000 |
24.00 |
0.63105 |
0.48401 |
0.82278 |
18 |
1.0000 |
10.0000 |
25.00 |
0.61267 |
0.46287 |
0.81096 |
19 |
1.0000 |
10.0000 |
26.00 |
0.59428 |
0.44209 |
0.79887 |
20 |
1.0000 |
10.0000 |
32.00 |
0.57437 |
0.41972 |
0.78601 |
21 |
1.0000 |
10.0000 |
35.00 |
0.55400 |
0.39725 |
0.77258 |
22 |
1.0000 |
10.0000 |
37.00 |
0.53276 |
0.37421 |
0.75849 |
23 |
1.0000 |
10.0000 |
41.00 |
0.48783 |
0.32796 |
0.72564 |
24 |
1.0000 |
10.0000 |
51.00 |
0.45964 |
0.29978 |
0.70476 |
25 |
1.0000 |
10.0000 |
52.00 |
0.42933 |
0.27013 |
0.68234 |
26 |
1.0000 |
10.0000 |
54.00 |
0.39588 |
0.23828 |
0.65773 |
27 |
1.0000 |
10.0000 |
58.00 |
0.35744 |
0.20219 |
0.63191 |
28 |
1.0000 |
10.0000 |
66.00 |
0.31314 |
0.16511 |
0.59386 |
29 |
1.0000 |
10.0000 |
67.00 |
0.26060 |
0.12215 |
0.55597 |
30 |
1.0000 |
10.0000 |
88.00 |
0.19554 |
0.07520 |
0.50849 |
31 |
1.0000 |
10.0000 |
89.00 |
0.12708 |
0.03552 |
0.45460 |
32 |
1.0000 |
10.0000 |
92.00 |
0.00000 |
. |
. |
33 |
1.8000 |
12.0000 |
0.00 |
1.00000 |
. |
. |
34 |
1.8000 |
12.0000 |
1.25 |
0.95911 |
0.90539 |
1.00000 |
35 |
1.8000 |
12.0000 |
2.00 |
0.89661 |
0.80943 |
0.99317 |
36 |
1.8000 |
12.0000 |
3.00 |
0.87577 |
0.77972 |
0.98365 |
37 |
1.8000 |
12.0000 |
5.00 |
0.82922 |
0.71569 |
0.96077 |
38 |
1.8000 |
12.0000 |
6.00 |
0.73347 |
0.59051 |
0.91105 |
39 |
1.8000 |
12.0000 |
7.00 |
0.66207 |
0.50199 |
0.87321 |
40 |
1.8000 |
12.0000 |
9.00 |
0.63684 |
0.47119 |
0.86072 |
41 |
1.8000 |
12.0000 |
11.00 |
0.51586 |
0.33578 |
0.79252 |
42 |
1.8000 |
12.0000 |
13.00 |
0.49143 |
0.30977 |
0.77964 |
43 |
1.8000 |
12.0000 |
14.00 |
0.46541 |
0.28297 |
0.76547 |
44 |
1.8000 |
12.0000 |
15.00 |
0.43993 |
0.25782 |
0.75068 |
45 |
1.8000 |
12.0000 |
16.00 |
0.39021 |
0.21151 |
0.71988 |
46 |
1.8000 |
12.0000 |
17.00 |
0.34175 |
0.17002 |
0.68695 |
47 |
1.8000 |
12.0000 |
18.00 |
0.31817 |
0.15092 |
0.67075 |
48 |
1.8000 |
12.0000 |
19.00 |
0.27297 |
0.11694 |
0.63717 |
49 |
1.8000 |
12.0000 |
24.00 |
0.25029 |
0.10101 |
0.62016 |
50 |
1.8000 |
12.0000 |
25.00 |
0.22899 |
0.08691 |
0.60331 |
51 |
1.8000 |
12.0000 |
26.00 |
0.20892 |
0.07453 |
0.58564 |
52 |
1.8000 |
12.0000 |
32.00 |
0.18857 |
0.06284 |
0.56583 |
53 |
1.8000 |
12.0000 |
35.00 |
0.16914 |
0.05245 |
0.54542 |
54 |
1.8000 |
12.0000 |
37.00 |
0.15038 |
0.04330 |
0.52228 |
55 |
1.8000 |
12.0000 |
41.00 |
0.11536 |
0.02803 |
0.47488 |
56 |
1.8000 |
12.0000 |
51.00 |
0.09645 |
0.02083 |
0.44664 |
57 |
1.8000 |
12.0000 |
52.00 |
0.07855 |
0.01454 |
0.42442 |
58 |
1.8000 |
12.0000 |
54.00 |
0.06154 |
0.00958 |
0.39522 |
59 |
1.8000 |
12.0000 |
58.00 |
0.04526 |
0.00562 |
0.36419 |
60 |
1.8000 |
12.0000 |
66.00 |
0.03039 |
0.00294 |
0.31365 |
61 |
1.8000 |
12.0000 |
67.00 |
0.01749 |
0.00113 |
0.27155 |
62 |
1.8000 |
12.0000 |
88.00 |
0.00737 |
0.00025 |
0.21804 |
63 |
1.8000 |
12.0000 |
89.00 |
0.00202 |
0.00003 |
0.14695 |
64 |
1.8000 |
12.0000 |
92.00 |
0.00000 |
. |
. |
65 |
1.3929 |
10.2015 |
0.00 |
1.00000 |
. |
. |
66 |
1.3929 |
10.2015 |
1.25 |
0.97418 |
0.94037 |
1.00000 |
67 |
1.3929 |
10.2015 |
2.00 |
0.93391 |
0.87985 |
0.99130 |
68 |
1.3929 |
10.2015 |
3.00 |
0.92026 |
0.86083 |
0.98378 |
69 |
1.3929 |
10.2015 |
5.00 |
0.88930 |
0.81957 |
0.96497 |
70 |
1.3929 |
10.2015 |
6.00 |
0.82351 |
0.73790 |
0.91905 |
71 |
1.3929 |
10.2015 |
7.00 |
0.77233 |
0.67778 |
0.88007 |
72 |
1.3929 |
10.2015 |
9.00 |
0.75376 |
0.65605 |
0.86601 |
73 |
1.3929 |
10.2015 |
11.00 |
0.66056 |
0.55310 |
0.78889 |
74 |
1.3929 |
10.2015 |
13.00 |
0.64078 |
0.53129 |
0.77285 |
75 |
1.3929 |
10.2015 |
14.00 |
0.61931 |
0.50772 |
0.75542 |
76 |
1.3929 |
10.2015 |
15.00 |
0.59785 |
0.48468 |
0.73744 |
77 |
1.3929 |
10.2015 |
16.00 |
0.55457 |
0.43948 |
0.69981 |
78 |
1.3929 |
10.2015 |
17.00 |
0.51037 |
0.39442 |
0.66040 |
79 |
1.3929 |
10.2015 |
18.00 |
0.48801 |
0.37196 |
0.64027 |
80 |
1.3929 |
10.2015 |
19.00 |
0.44335 |
0.32820 |
0.59890 |
81 |
1.3929 |
10.2015 |
24.00 |
0.41989 |
0.30524 |
0.57761 |
82 |
1.3929 |
10.2015 |
25.00 |
0.39714 |
0.28347 |
0.55639 |
83 |
1.3929 |
10.2015 |
26.00 |
0.37497 |
0.26282 |
0.53498 |
84 |
1.3929 |
10.2015 |
32.00 |
0.35164 |
0.24133 |
0.51237 |
85 |
1.3929 |
10.2015 |
35.00 |
0.32849 |
0.22049 |
0.48941 |
86 |
1.3929 |
10.2015 |
37.00 |
0.30517 |
0.20007 |
0.46547 |
87 |
1.3929 |
10.2015 |
41.00 |
0.25847 |
0.16077 |
0.41554 |
88 |
1.3929 |
10.2015 |
51.00 |
0.23104 |
0.13796 |
0.38692 |
89 |
1.3929 |
10.2015 |
52.00 |
0.20316 |
0.11476 |
0.35966 |
90 |
1.3929 |
10.2015 |
54.00 |
0.17436 |
0.09223 |
0.32962 |
91 |
1.3929 |
10.2015 |
58.00 |
0.14382 |
0.06924 |
0.29873 |
92 |
1.3929 |
10.2015 |
66.00 |
0.11207 |
0.04867 |
0.25804 |
93 |
1.3929 |
10.2015 |
67.00 |
0.07928 |
0.02819 |
0.22292 |
94 |
1.3929 |
10.2015 |
88.00 |
0.04614 |
0.01171 |
0.18181 |
95 |
1.3929 |
10.2015 |
89.00 |
0.02048 |
0.00311 |
0.13487 |
96 |
1.3929 |
10.2015 |
92.00 |
0.00000 |
. |
. |
|
The first 32 observations of the data set Pred1 (shown in Output 49.6.1) 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.
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 49.6.2. Note that
these survivor functions are portrayed as right-continuous functions.
Output 49.6.2: Survival Curves for Specific Covariate Patterns
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.