Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- PROC Phreg with Contrast statement instead of hazardratio statement

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
(1081 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!

**Available on demand!**

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

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.