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
- /
- hazard ratio from regression coefficients in an interaction term

Options

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

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

Posted 06-12-2018 07:24 PM
(1499 views)

I am using proc phreg to estimate hazard ratios, my model is as follows:

time*event(0) = week|avg education race;

random zipcode;

I would like to get the hazard ratio for 'week'. I was originally doing this by hand by summing the estimate from week and the interaction term, but assume there is a way to do this using estimate/contrast?

Thank you!

5 REPLIES 5

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

Try a HAZARDRATIO statement instead. Much simpler syntax.

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

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

When I use the hazardratio statement I cannot recreate what I get when I am summing the coefficients by hand. This is why I wasn't using it initially - is there a specification that needs to be made?

Example:

Estimate | Exp summed estimate | Hazard Ratio from SAS | |

average | 0.000196 | 0.999763628 | 0.995 |

week | -0.0002121 | ||

week*average | -0.0000243 |

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

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

99% of the time the error is with the hand calculation.

Do it with a data step so you can't get any typo's or rounding errors and post your code if it still doesn't match.

**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.