turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- How to compute relative risk when having 0 frequen...

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-14-2017 05:46 PM

I have two binary variables: treatment arm (arm 1, arm 2) and event (Yes, No) for each participant. I transformed my participant-level data into a long format summary data (so now I have 3 variables: count, arm and event). My goal is to compute the relative risk of event in arm 1 comparing to arm 2, and the exact confidence interval. The problem is the frequency of the event in arm 2 is 0 (no one had event in arm 2) so I always get infinite RR. And upper bound of my confidence interal goes to infinite as well. Is there a way to avoid this problem? I learned that proc freq would add 0.5 to each frequency to ensure that the statistics is defined when there is 0 frequency table cells but I couldn't figure out the code.

Here is my code:

proc freq data=data1;

weight Count;

tables arm*event ;

exact RELRISK;

run;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to GordonC_SAS

07-14-2017 06:03 PM

Can you share the cell counts you are getting in the 2x2 table?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to ballardw

07-17-2017 10:45 AM

my cell count frequencies are:

arm 1, event = yes: 5

arm 1, event = no : 70

arm 2, event = Yes: 0

arm 2, event = No: 26

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to GordonC_SAS

07-15-2017 07:59 AM

```
proc freq data=data1;
weight Count/ZERO;
tables arm*event ;
exact RELRISK;
run;
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Ksharp

07-17-2017 10:51 AM

I'm still getting infinite relative risk with the ZERO option.