SAS Commands for Analyzing an RCBD with a Factorial Arrangement
Please note that SAS will not calculate LSD values or do mean separation for
interactions.
SAS will only calculate LSD values and do mean separation on the main effects.
The analysis below assumes factors A, B, and C are all considered fixed effects.
options pageno=1;
data fact;
input A $ B $ C$ Trt Rep Yield;
datalines;
a0 b0 c0 1 1 12
a0 b0 c1 2 1 18
a0 b1 c0 3 1 16
a0 b1 c1 4 1 24
a1 b0 c0 5 1 18
a1 b0 c1 6 1 27
a1 b1 c0 7 1 23
a1 b1 c1 8 1 31
a2 b0 c0 9 1 25
a2 b0 c1 10 1 36
a2 b1 c0 11 1 28
a2 b1 c1 12 1 41
a0 b0 c0 1 2 22
a0 b0 c1 2 2 29
a0 b1 c0 3 2 25
a0 b1 c1 4 2 37
a1 b0 c0 5 2 32
a1 b0 c1 6 2 41
a1 b1 c0 7 2 32
a1 b1 c1 8 2 41
a2 b0 c0 9 2 35
a2 b0 c1 10 2 51
a2 b1 c0 11 2 36
a2 b1 c1 12 2 50
a0 b0 c0 1 3 25
a0 b0 c1 2 3 29
a0 b1 c0 3 3 28
a0 b1 c1 4 3 37
a1 b0 c0 5 3 31
a1 b0 c1 6 3 39
a1 b1 c0 7 3 35
a1 b1 c1 8 3 42
a2 b0 c0 9 3 41
a2 b0 c1 10 3 49
a2 b1 c0 11 3 45
a2 b1 c1 12 3 60
;;
ods rtf file='example.rtf';
run;
proc anova;
class rep A B C;
model yield=rep A B C A*B A*C B*C A*B*C;means A B C/lsd;
means A*B A*C B*C;
title 'RCBD with a 3x2x2 Factorial Arrangement';
run;
ods rtf close;
run;