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.