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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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