BookmarkSubscribeRSS Feed
jomag
Obsidian | Level 7

hi everyone,

 

I want to calculate the effect estimate of my 4-level categorical variable when my two-level categorical variable =1 and when the two-level categorical variable=2 in proc glimmix.

 

However, I am not sure of my estimate statement, and I'd appreciate any input or help on how to write this interaction estimate statement.

 

Below is my current SAS code:

proc glimmix data=data method=quad(qpoints=50) inititer=5;

class id var1 var2 var3 ;
model outcome = var1 var2 var3 var1*var2 / link=log solution dist=nb offset=log_PY;
random int / subject=id;

estimate 'n vs h' var1 1 0 0 -1/exp cl;
estimate 'l vs h' var1 0 1 0 -1/exp cl;
estimate 'm vs h' var1 0 0 1 -1/exp cl;

estimate 'var1 when var2=1' 

var1 1 0 0 -1
var1*var2 1 -1 /exp cl;

estimate 'var1 when var2=2' 

var1 1 0 0 -1
var1*var2 -1 1 /exp cl;


run;

Thank you.

1 REPLY 1

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 356 views
  • 0 likes
  • 2 in conversation