Quartz | Level 8

How to plot cumulative hazard graph with 95%CI rather than 95%CL after PROC PHREG

Hello, everyone

I am practicing COX regression. I see from the SAS support webpage that, after PROC PHREG, we can plot cumulative hazard graphs with the 95% confidence limits. However, I would like to plot the cumulative hazard graphs with the 95% confidence interval. I did not find the option from the webpage to do so.

As you know, 95%CL is much wider than 95%CI. I see some research publications have cumulative hazard graphs with 95%CI.

I would like to hear your ideas, thanks.

Partial code:

```proc phreg data = DSP2_raw  plots(overlay = bygroup) = (survival cumhaz);
class v1(ref='0')
v2(ref='0')
v3(ref='0')
v4(ref='0')
v5(ref='0');
model TimeEvent*Event(0) = v1
v2
v3
v4
v5
v6
v7
...
vn / rl = wald;
baseline covariates = predict;
run;```
1 ACCEPTED SOLUTION

Accepted Solutions
SAS Super FREQ

Re: How to plot cumulative hazard graph with 95%CI rather than 95%CL after PROC PHREG

@TomHsiung wrote:

As you know, 95%CL is much wider than 95%CI.

????

Confidence limits are the numbers at the upper and lower end of a confidence interval.
Are you referring to prediction band?
A prediction interval is less certain (hence wider) than a confidence interval. That's because a prediction interval predicts an individual number, whereas a confidence interval is for the mean.

Koen

6 REPLIES 6
SAS Super FREQ

Re: How to plot cumulative hazard graph with 95%CI rather than 95%CL after PROC PHREG

@TomHsiung wrote:

As you know, 95%CL is much wider than 95%CI.

????

Confidence limits are the numbers at the upper and lower end of a confidence interval.
Are you referring to prediction band?
A prediction interval is less certain (hence wider) than a confidence interval. That's because a prediction interval predicts an individual number, whereas a confidence interval is for the mean.

Koen

Quartz | Level 8

Re: How to plot cumulative hazard graph with 95%CI rather than 95%CL after PROC PHREG

Oh! I thought the CL option in plots(overlay cl) was the prediction interval. Probably, I was misled by chatGPT, I think. I remember chatGPT told me CL (confidence limits) and CI (confidence intervals) were different. At the same time, my data showed a very wide band, which led me to the wrong conclusion.

Thank you for your clarification. Appreciated!

Quartz | Level 8

Re: How to plot cumulative hazard graph with 95%CI rather than 95%CL after PROC PHREG

Update:

When plots option, overlay & cl, are used together, no CL bands. It shows CL bands when plots option has only cl.

`proc phreg data = cox_raw plots(overlay cl) = cumhaz;`

SAS Super FREQ

Re: How to plot cumulative hazard graph with 95%CI rather than 95%CL after PROC PHREG

@TomHsiung wrote:

Update:

When plots option, overlay & cl, are used together, no CL bands. It shows CL bands when plots option has only cl.

`proc phreg data = cox_raw plots(overlay cl) = cumhaz;`

That's not my experience.

I have just submitted :

``````ods graphics on;
proc phreg data=Myeloma plots(overlay cl)=cumhaz;
model Time*VStatus(0)=LogBUN HGB;
baseline covariates=Inrisks out=Pred1 survival=_all_/rowid=Id;
run;``````

... and it properly shows everything asked for.

Koen

Quartz | Level 8

Re: How to plot cumulative hazard graph with 95%CI rather than 95%CL after PROC PHREG

@sbxkoenk Much appreciate for your additional information. I can see that you do researches about INR, haha.

Below is my codes. I don't know what is wrong. Another thing is that I switched from SAS 9.4 to SAS Viya (update: I have tested these code lines on SAS OnDemand, and no CL bands there on cumhaz graph).

``````proc phreg data = cox_raw plots(overlay cl) = cumhaz;
class genderC(ref = '0') AF(ref = '0') Hypertension(ref = '0') CHF(ref = '0') akiC(ref = '0')
ddiC(ref = '0') indicationC(ref = '0') CYP2C9code(ref = '0') VKORC1Code(ref = '0') Warfarin_History(ref = '0');
model timeToFirstInrAttain*firstInrAttain(0) = bsa ageY genderC AF Hypertension CHF
serumalb akiC ddiC indicationC CYP2C9code VKORC1code Warfarin_History / rl=wald;
baseline covariates = predict_cox;
run;``````

SAS Super FREQ

Re: How to plot cumulative hazard graph with 95%CI rather than 95%CL after PROC PHREG

Hello,

Also on Viya it's working for me (I am using Viya 4 Stable 2024.06).

What SAS Viya version are you using?

Submit:

``%PUT &=sysvlong4;``

... to find out. See LOG-screen for the answer.

I cannot spot an error in your code.
You can also contact SAS Technical Support (TS) for this. You can do so via the SAS Customer Service Portal (customer portal).
https://service.sas.com/csm

Koen

Discussion stats
• 6 replies
• 691 views
• 3 likes
• 2 in conversation