Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- How to plot cumulative hazard graph with 95%CI rather than 95%CL after...

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

☑ This topic is **solved**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 3 weeks ago
(576 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@sbxkoenk Hi, pal. Thank you for your reply.

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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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;

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

@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;
```

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.