BookmarkSubscribeRSS Feed
ellen_qi
Calcite | Level 5

Hi guys,

I am struggling now to make a plot for the ratios and their confidence intervals from proc genmod. 

The code is now like: 

proc genmod data=fmdfmd;

class dummy_fmd_bed (ref='0');

model had_procedure (event='1')=age_at_dx dummy_fmd_bed dxtest_renal pmh_dissection pmh_aneurysm pres_hypertension pres_dissection_car_vert meds_no_of_bp_meds/alpha=0.1 dist=bin link=log;


estimate 'age_at_dx' age_at_dx -10/ exp alpha=0.1;
estimate 'dummy_fmd_bed' dummy_fmd_bed 1 -1/exp alpha=0.1;
estimate 'dxtest_renal' dxtest_renal 1 -1/exp alpha=0.1;
estimate 'pmh_dissection' pmh_dissection 1 -1/exp alpha=0.1;
estimate 'pmh_aneurysm' pmh_aneurysm 1 -1/exp alpha=0.1;
estimate 'pres_dissection_car_vert' pres_dissection_car_vert 1 -1/exp alpha=0.1;
estimate 'pres_hypertension' pres_hypertension 1 -1/exp alpha=0.1;
estimate 'meds_no_of_bp_meds' meds_no_of_bp_meds 1 /exp alpha=0.1;

run;

 

So these exponentiation estimate can give the ratios, but i want a plot of these ratios just like the odds ratio plots. Is there any way to do it?

4 REPLIES 4
Reeza
Super User

See the instructions about halfway down the page:

https://blogs.sas.com/content/iml/2015/07/29/or-plots-log-scale.html

 


@ellen_qi wrote:

Hi guys,

I am struggling now to make a plot for the ratios and their confidence intervals from proc genmod. 

The code is now like: 

proc genmod data=fmdfmd;

class dummy_fmd_bed (ref='0');

model had_procedure (event='1')=age_at_dx dummy_fmd_bed dxtest_renal pmh_dissection pmh_aneurysm pres_hypertension pres_dissection_car_vert meds_no_of_bp_meds/alpha=0.1 dist=bin link=log;


estimate 'age_at_dx' age_at_dx -10/ exp alpha=0.1;
estimate 'dummy_fmd_bed' dummy_fmd_bed 1 -1/exp alpha=0.1;
estimate 'dxtest_renal' dxtest_renal 1 -1/exp alpha=0.1;
estimate 'pmh_dissection' pmh_dissection 1 -1/exp alpha=0.1;
estimate 'pmh_aneurysm' pmh_aneurysm 1 -1/exp alpha=0.1;
estimate 'pres_dissection_car_vert' pres_dissection_car_vert 1 -1/exp alpha=0.1;
estimate 'pres_hypertension' pres_hypertension 1 -1/exp alpha=0.1;
estimate 'meds_no_of_bp_meds' meds_no_of_bp_meds 1 /exp alpha=0.1;

run;

 

So these exponentiation estimate can give the ratios, but i want a plot of these ratios just like the odds ratio plots. Is there any way to do it?


 

ellen_qi
Calcite | Level 5

I know how to get the odds ratio plot under logistic, but mine is under proc genmod, and this literature does not provide methods how to do it. 

Reeza
Super User

I don't believe GENMOD supports producing a ODDS RATIO plot by default, therefore the reference to literature that shows you how to create it manually.

 

EDIT: Note that I've moved this post to the Statistical Procedures forum so someone with more experience can help. 

ellen_qi
Calcite | Level 5

Thank you 🙂 First time here for help! 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 4 replies
  • 1984 views
  • 3 likes
  • 2 in conversation