BookmarkSubscribeRSS Feed
esass
Calcite | Level 5

Is there a way to calculate PAFs using odds in SAS? I've been using PROC STDRATE but it only allows rates/risks.

2 REPLIES 2
ballardw
Super User

By "using Odds" do you mean "odds ratio"? or something else?

 

You may have to describe the actual problem and data in more detail to get a definitive answer for your need.

esass
Calcite | Level 5

Yes! An odds ratio from a 2x2 using case-control data. Not tied to STDRATE - just looking for a way to get the PAF and corresponding 95% confidence interval. STDRATE only calculates risks/rates. Example below:

 

Event_E = # exposed cases, Count_E = total # exposed, Event_NE = # unexposed cases, Count_NE = total # unexposed

 

data example ;

input Event_E Count_E Event_NE Count_NE;

datalines;

20 200 59 1065

 ;

proc stdrate data=example

refdata=example 

method=indirect(af)

stat=risk;

population event=Event_E total=Count_E;

reference event=Event_NE total=Count_NE;

run;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 995 views
  • 0 likes
  • 2 in conversation