BookmarkSubscribeRSS Feed
mariko5797
Pyrite | Level 9

I want to find the relative risk and risk difference and their corresponding 95% CIs to compare adverse events in a treatment group compared to a placebo group. 

What 95% CI can handle zero counts using PROC FREQ (or a different procedure)? I was going to use Wald and Agresti-Caffo, respectively, but it looks like Wald can't handle zero counts and since we have a small sample size (n<10), perhaps that's not the best option in general...

9 REPLIES 9
PaigeMiller
Diamond | Level 26

What does "handle" mean in this context? It seems to me that PROC FREQ handles zero counts properly, by my definition of "handle".

--
Paige Miller
mariko5797
Pyrite | Level 9

For example, SAS documentation states if any of the cells are zero, then Wald 95% CI cannot be computed.

PaigeMiller
Diamond | Level 26

Yes, in that case, SAS "handles" it properly, as far as I know.

--
Paige Miller
mariko5797
Pyrite | Level 9

I see what you mean. Let me re-phrase then, are there any methods that will give me 95% CI if there is a zero in one of the cells? Are would they all be non-calculable?

SAS_Rob
SAS Employee

Unfortunately, PROC FREQ doesn’t provide RISKDIFF analysis for two-way tables when there is a zero-frequency column(both treatment arms have no positive responses). In the meantime the work-around to assign very small weights to the zero-frequency cells in your two-way table is the only option. When you use this work-around, the following confidence limit types are available for the risk difference: Agresti-Caffo, Hauck-Anderson, Miettinen-Nurminen (score), and Newcombe. Of course the traditional/Wald confidence limits are also available, but equal (0,0) in the case of a zero-frequency column where the estimate of the risk difference is 0.   

mariko5797
Pyrite | Level 9
What about for relative risk?
SAS_Rob
SAS Employee

This approach would also work for the relative risk with all of the CL= options other than EXACT.

data_null__
Jade | Level 19

I don't know if it will work or be statistically correct, but you could try setting the zero cell to a very small WEIGHT 1e-11 and see what happens.

 

Also, showing your work.

jorgelobin
Fluorite | Level 6

Hi there! 👋

You're absolutely right to be cautious about using Wald intervals, especially when dealing with small sample sizes and zero counts. The Agresti-Caffo method is a great alternative in these situations, as it can handle zero counts and tends to provide more reliable estimates when sample sizes are small (n < 10).

I recently wrote a detailed article on this topic, where I explain the Agresti-Caffo method, including its SAS implementation. In the article, I also provide a step-by-step example with SAS code and discuss the interpretation of the results. This should be particularly useful for your scenario of calculating relative risk and risk difference along with their 95% confidence intervals.

You can find the article here: Agresti-Caffo Implementation in SAS

The method works well for small sample sizes and when dealing with zero counts, so it could be exactly what you're looking for.

Feel free to check it out and let me know if you have any further questions!

Best of luck with your analysis! 😊

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Discussion stats
  • 9 replies
  • 977 views
  • 9 likes
  • 5 in conversation