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

I am conducting an interaction analysis in PROC GLIMMIX and would like to present my interaction analysis with a single reference category. The interaction is between two categorical variables (2-level and 5-level variable). I have only been able to build obtain an output displaying ORs with separate reference groups. See tables below - I am attempting to display results similar to Table 6 with a single reference group.

proc glimmix data=cares2 method=quad;
class group outcome (ref="No") intervention(ref="No") area(ref="small") gender(ref="Female") /;
model outcome = intervention area gender age intervention*area / dist=binary link=logit ddfm=bw solution oddsratio;
random intercept / subject=group;
lsmeans intervention*area / slicediff=area adjust=bon oddsratio cl ilink;
run;

njgrubic_0-1605019116548.png

njgrubic_1-1605019131838.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
You'll need to manually double code that and you can get an OR table that compares the different levels.

One quick way:

Asbestos_Smoker = catx(" - ", var1, var2);

Then use the asbestos_smoker variable in your model instead of the interaction term and specify your combined reference level as desired.

View solution in original post

3 REPLIES 3
Reeza
Super User
You'll need to manually double code that and you can get an OR table that compares the different levels.

One quick way:

Asbestos_Smoker = catx(" - ", var1, var2);

Then use the asbestos_smoker variable in your model instead of the interaction term and specify your combined reference level as desired.

njgrubic
Fluorite | Level 6

Thanks Reeza. I have attached an image of part of the Differences of intervention*area LSM output adjusted for multiple comparisons below.

njgrubic_0-1605146506836.png

Do the 'pre-underscored' variables (i.e. _intervention, _area) indicate the reference category that is being used to calculate the OR? In this case, would I be able to obtain these comparisons by locating the appropriate comparisons in this table, as opposed to creating a new variable?

Reeza
Super User
No, but I do think you could if you used a custom ODDS ratio statement but you'll have to manually specify it. Recoding the variable is the simplest option as the output won't be ambiguous in any manner.

SAS Innovate 2025: Register Now

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1210 views
  • 0 likes
  • 2 in conversation