Reputation: 105
When there are a lot of groups to compare, lsmeans/pdiff
option gives too many pairwise comparisons. What I need is a table like
which shows that Group 1,2 are different from Group 5,6, but not different from Group 3,4.
Is there an option in SAS proc mixed or other procedures to do this?
Upvotes: 0
Views: 450
Reputation: 9109
You are looking for the LINES option on the LSMEANS statement however it does not work in PROC MIXED so you will need to use PROC PLM.
proc mixed data=sashelp.class;
class age;
model weight=age;
lsmeans age; *for check;
store out=classmodel;
run;
quit;
proc plm restore=classmodel;
lsmeans age / lines;
run;
quit;
Upvotes: 2
Reputation: 27498
Try using a custom format that is applied during the Proc.
proc format;
value groupCat
1 = 'A'
2 = 'A'
3 = 'AB'
4 = 'AB'
5 = 'B'
6 = 'B'
;
run;
proc mixed …;
… ;
format group groupCat.;
…
Upvotes: 0