options pageno=1; data factor; input a b rep yield; datalines; 0 0 1 12 0 0 2 15 0 0 3 14 0 0 4 13 0 1 1 19 0 1 2 22 0 1 3 23 0 1 4 21 1 0 1 29 1 0 2 27 1 0 3 33 1 0 4 30 1 1 1 32 1 1 2 35 1 1 3 38 1 1 4 37 ;; proc print; title 'Printout of Factorial Data'; run; proc anova; classes rep a b; model yield=rep a b a*b; means a b/lsd; means a*b; title 'ANOVA assuming A and B are fixed effects'; run; proc anova; classes rep a b; model yield=rep a b a*b; test h=a b e=a*b; means a b/lsd e=a*b; means a*b; title 'ANOVA assuming A and B are random effects'; run;