data onerand; input influent y; if influent=3 or influent=5 then type=1; else if influent=6 then type=3; else type=2; datalines; 1 21 1 27 1 29 1 17 1 19 1 12 1 29 1 20 1 20 2 21 2 11 2 18 2 9 2 13 2 23 2 2 3 20 3 19 3 20 3 11 3 14 4 14 4 24 4 30 4 21 4 31 4 27 5 7 5 15 5 18 5 4 5 28 6 41 6 42 6 35 6 34 6 30 ; proc glm; title 'one-way random anova';class influent; model y=influent; random influent/test; run; proc mixed covtest; title 'one-way random anova';class influent; model y=; random influent; run; proc glm;title 'two-way mixed anova';class influent type; model y= type influent(type); random influent(type)/ test;run; proc mixed covtest; title 'two-way mixed anova';class type influent; model y=type; random influent(type);run;