Hi Natanya
I've had the same problem before, and basically what you have to do is include the interaction in your contrast, and the factor you're comparing i.e. trt.
It sounds like you have 3 treatment levels and 2 categories levels is this correct?
If it is I would use something like this.
proc glm data=a order = data;
class cat trt ;
model results=trt cat trt*cat;
means trt cat trt*cat;
estimate "Cat1 - control vs t2" trt 1 -1 0 trt*cat 1 -1 0 0 0 0 / e;
estimate "Cat1 - control vs t3" trt 1 0 -1 trt*cat 1 0 -1 0 0 0 / e;
estimate "Cat2 - control vs t2" trt 1 -1 0 trt*cat 0 0 0 1 -1 0 / e;
estimate "Cat2 - control vs t3" trt 1 0 -1 trt*cat 0 0 0 1 0 -1 / e;
run;quit;
I have changed the variables in the clas statement to make the contrasts easier to understand, and I have used estimate instead of contrast just because I prefer it. The e option makes you understand if the coefficients you are using are correct.
Basically to go through first contrast we are saying that we want to compare treatment 1 against 2, and we are also saying that we want this comparison to be at Category 1.
An alternative way to get out the differences quickly and associated p-values is just to use the lsmeans statement Proc Mixed with the diffs option, but the default option does give you every possible interaction comparison.
proc mixed data=a order = data;
class cat trt ;
model results=trt cat trt*cat;
lsmeans trt*cat / diffs;
run;quit;
If you have any questions, please ask.
Thanks!