Lab 7: CRD, RCBD and efficiency: Example 1: A greenhouse consisting of six benches was to be used for an experiment assessing growth among four varieties of house plants. Because light intensity, humidity and temperature varied throughout the greenhouse it was decided that each bench should contain a complete replication of the experiment. Thus, each bench received each variety of potted plant. The change in plant height (cm) after 2 weeks was recorded: Bench Varieties 3 1 2 1 19.8 21.9 16.4 14.7 2 16.7 19.8 15.4 13.5 3 17.7 21.0 14.8 12.8 4 18.2 21.4 15.6 13.7 5 20.3 22.1 16.4 14.6 6 15.5 20.8 14.6 12.9 Run this as a RCBD and see if there is a block effect. Run this as if it were CRD and look at efficiency in this context. data RCBD; input b datalines; 1 19.8 2 16.7 3 17.7 4 18.2 5 20.3 6 15.5 1 21.9 2 19.8 3 21.0 4 21.4 5 22.1 6 20.8 1 16.4 2 15.4 3 14.8 4 15.6 y a $; v1 v1 v1 v1 v1 v1 v2 v2 v2 v2 v2 v2 v3 v3 v3 v3 4 5 16.4 v3 6 14.6 v3 1 14.7 v4 2 13.5 v4 3 12.8 v4 4 13.7 v4 5 14.6 v4 6 12.9 v4 ; proc glm data=rcbd; class a b; model y=a b ; random b /test; lsmeans a / adjust=tukey; output out=out p=py r=ry; run; goptions reset; symbol1 color="red" v="star" interpol=none; symbol2 color="black" v="circle" interpol=join; proc gplot data=out; /* Diagnostic Plots */ plot y*py py*py / overlay; /* observed v. predicted */ plot ry*py; /* residual v. predicted */ run; proc capability data=out; var ry; qqplot; run; data CRD; input b datalines; 1 19.8 2 16.7 3 17.7 4 18.2 5 20.3 6 15.5 1 21.9 2 19.8 3 21.0 4 21.4 5 22.1 6 20.8 1 16.4 2 15.4 3 14.8 4 15.6 5 16.4 6 14.6 1 14.7 y a $; v1 v1 v1 v1 v1 v1 v2 v2 v2 v2 v2 v2 v3 v3 v3 v3 v3 v3 v4 2 13.5 v4 3 12.8 v4 4 13.7 v4 5 14.6 v4 6 12.9 v4 ; proc glm data=CRD; class a ; model y=a ; lsmeans a / adjust=tukey; output out=out p=py r=ry; run; goptions reset; symbol1 color="red" v="star" interpol=none; symbol2 color="black" v="circle" interpol=join; proc gplot data=out; /* Diagnostic Plots */ plot y*py py*py / overlay; /* observed v. predicted */ plot ry*py; /* residual v. predicted */ run; proc capability data=out; var ry; qqplot; run; RCBD in two factors: data calculator; input mdl $ block problem $ cards; new 1 eng 3.1 new 2 eng 3.8 new 3 eng 3.0 new 4 eng 3.4 new 5 eng 3.3 new 6 eng 3.6 old 1 eng 7.5 old 2 eng 8.1 old 3 eng 7.6 old 4 eng 7.8 old 5 eng 6.9 old 6 eng 7.8 new 1 stat 2.5 new 2 stat 2.8 new 3 stat 2.0 new 4 stat 2.7 new 5 stat 2.5 new 6 stat 2.4 old 1 stat 5.1 old 2 stat 5.3 old 3 stat 4.9 old 4 stat 5.5 old 5 stat 5.4 old 6 stat 4.8 ; proc glm data=calculator; response; class block mdl problem; model response=block mdl problem mdl*problem; random block/test; lsmeans mdl*problem/pdiff adjust=tukey; run;