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
- /
- Re: PROC Phreg with Contrast statement instead of hazardratio statemen...

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** and **locked**.
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 06-21-2019 01:43 PM
(1130 views)

Hi

I'm trying to compute hazard ratios with confidence intervals and p values for my interaction term's between my explanatory variable var and another variable, polymicrobial, that modifies the effect of var on my outcome. (interaction term significant)

var is a binary variable (1 or 2)

polymicrobial is a binary variable (1 and 0's)

I've computed HR's and CL with a hazardratio statements as seen below. I want to compute the exact same in contrast statements, so i can get CI's and p-values for:

var = 1 vs var= 2 at polymicrobial = 1

var = 1 vs var = 2 at polymicrobial = 2

polymicrobial 1 vs 0 at var =1

polymicrobial 1 vs 0 at var=2.

my code is as follows:

Proc phreg data = d;

class var (ref='2') polymicrobial2(ref='0') /param= glm;

model (tid,Time_to_death_180Days)*Mortality_180_days(0) = var|polymicrobial age sex saps chronic_disease /risklimits ;

hazardratio var/ at(polymicrobial= all) ;

hazardratio polymicrobial / at(var=ALL) ;

run ;

Can you help me do the same with contrast statements, I don't understand the syntax.

Thanks in advance

btw im running SAS 9.4

1 ACCEPTED SOLUTION

Accepted Solutions

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

2 REPLIES 2

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

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

Thank you!

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.