Is there a way to calculate PAFs using odds in SAS? I've been using PROC STDRATE but it only allows rates/risks.
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.
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;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.