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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

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
  • 417 views
  • 0 likes
  • 2 in conversation