02-28-2012 12:54 PM
I performed a mixed model procedure and in this procedure, I used group as the fixed effect. The group is a categorical variable and has 4 level. And I want to compare the difference between each group with the contrast statement. Here is my code:
proc mixed data=test;
contrast 'group1 vs2' group 1 -1 0 0;
contrast 'group1 vs3' group 1 0 -1 0;
contrast 'group1 vs4' group 1 0 0 -1;
However, I got 3 SAME contrast p-value. But those 4 groups are different from each other. Why I got the same p-value for those 3 comparisons? Thanks!
02-28-2012 02:45 PM
SAS isn't considering GROUP a categorical variable if its not in the class statement.
You might want to include in your BY statement perhaps, ie a separate model for each value of name? or you can have both in the class statement.
CLASS group name;
Not sure, depends on what you're trying to do.