BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
math2206
Fluorite | Level 6

Hello, I am using proc genmod to run log binomial analysis that involve an interaction term between 7 age groups and two gender groups (coded 1 for Male and 2 for Female). Reference group for gender is Male and for age '12-17'. This is my code: 

 

proc genmod data =_data.sample descending;
 class gender age_grps(ref="12-17") site/ param=ref;
 model  f_myo = gender age_grps gender*age_grps/ dist = binomial link = log;
 repeated subject=site;
run;

I am struggling to understand the output and specifically, which group is a reference for gender-sex interaction. Is it Male*12-17 or Female*12-17? This is my output:

 

Capture.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

The reference category for gender*age_grps uses gender=2 (female) and age_grps='12-17'.  The estimates that appear for gender*age_grps levels are "incremental" effects compared to that reference group.

View solution in original post

4 REPLIES 4
sbxkoenk
SAS Super FREQ

Hello,

 

Your reference level for gender is '2' (Female).

Your reference level for age_grps is "12-17" .

 

If you want a single reference category for the interaction analysis, I would make the interaction effect upfront, like :

gender_times_age_grps = catx(" + ", gender , age_grps );

 

Then put that self-made interaction effect in the CLASS statement and specify the reference level you want (ref= ).

In the model statement, use the three variables specified in the CLASS statement and no other effects.

 

Thanks,

Koen

math2206
Fluorite | Level 6
Thank you, Koen.
That was very helpful. You are right, my reference was Female group, not Male. I made an error in my post. I never thought about trying a new variable for sex*age. It was interesting to see that I had different result for this variable to the one where I use param=glm and compare all sex*age interaction groups to Female*12-17.
I ended up using proc logistic and oddsratio for age_grps AT (gender='1') to figure out if that result matches my proc genmod output for gender*age_grps. It provided ORs for age_grps xx vs 12-17 at gender=1 and they matched my estimates from proc genmod. That means to me that my estimations for interaction in proc genmod are for Males in each age group vs Males in 12-17.
Rick_SAS
SAS Super FREQ

The reference category for gender*age_grps uses gender=2 (female) and age_grps='12-17'.  The estimates that appear for gender*age_grps levels are "incremental" effects compared to that reference group.

math2206
Fluorite | Level 6
Thank you everyone for you replies, I think I worked it out why reference group for gender*age_grps is gender=2 (female) and age_grps='12-17'.

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 894 views
  • 3 likes
  • 3 in conversation