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:
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.
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
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.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.