BookmarkSubscribeRSS Feed
jdr1
Obsidian | Level 7

Dear SAS Users, 

Is there an easy way to program SAS output from proc genmod into publication ready tables? The cutting and pasting of exponentiated output is very cumbersome. 

 

I'm running a repeated measures GEE model in proc genmod for 8 individual mental health outcomes (e.g., depression, anxiety_stress, self_harm, relationship, suicide, substance, abuse). 

 

**stress and anxiety;

proc genmod data=ctl.mixedrev ;

 

class actor_id age_fin (ref="2") race_clean (ref='4') sex_iden (ref="1") time_march (ref='0') pre (ref="1") lgbtq (ref='0') active_rescue (ref='0') COVID_19 (ref='0') isolated (ref='0')/ param=GLM;

model stress_anxiety (event='1') = age_fin race_clean sex_iden time_march lgbtq active_rescue COVID_19 isolated/dist=poisson

link=log

type3covbdscale;

repeated subject = actor_id / type=AR(1) ;

lsmeans time_march / diff exp cl;

*lsmeans age2/e;

*lsmeans race_rev/e;

*lsmeans sex_rev1/e;

*lsmeans time_march/e;

*slice time_march *  race_rev / sliceby race_rev diff oddsratio cl;

*estimate 'Gender effect' sex_rev1 10000000-1 / exp;

run;

 

First, I really want to be able to output the output from each of the 8 models into a publication ready table, but don't know where to start. 

 

Then I want to plot forest plots for a number of interaction terms within each model. 

 

How can I do this? I'd really like to be able to move away from putting everything in excel, then exponentiating, then cutting and pasting into a word table. 

 

Thanks for any help you may be able to provide! 

3 REPLIES 3
SteveDenham
Jade | Level 19

Check out the use of ODS.  You can use it to produce pdf or rtf files of the various tables in the output.  It is a 3 phase learning curve (in my opinion), kind of steep at first, then once you have the basics down adding new techniques is pretty simple, and then finally working on using ODS OUTPUT as a first step to PROC REPORT (which I always find harder).  Check the Programming-->ODS and Base Reporting forum for more information.

 

SteveDenham

jdr1
Obsidian | Level 7

Hi Steve, 

 

Greatly appreciate your response. I'll be sure to check out 'Programming-->ODS and Base Reporting' and welcome any additional recommendations on tutorials or books in which I could start walking through to gain ground in this area. 

 

Thanks again! 

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
  • 3 replies
  • 1062 views
  • 0 likes
  • 3 in conversation