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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.