OPTION LS=76 NOCENTER; DATA fruit;INPUT variety pestcide r1 r2; y=r1;output;y=r2;output; cards; 1 1 49 39 1 2 50 55 1 3 43 38 1 4 53 48 2 1 55 41 2 2 67 58 2 3 53 42 2 4 85 73 3 1 66 68 3 2 85 92 3 3 69 62 3 4 85 99 ; PROC PRINT;VAR variety pestcide y; TITLE 'Print all the data for fruit variety and pesticide'; PROC GLM;CLASS variety pestcide; MODEL y=variety pestcide; TITLE 'Two Way without interaction by GLM'; PROC MIXED; CLASS variety pestcide; MODEL y=pestcide; RANDOM variety; TITLE 'Twoway without intercation by MIXED with RANDOM variety'; PROC GLM;CLASS variety pestcide; MODEL y=variety pestcide variety*pestcide; TITLE 'Two way ANOVA with replicate'; MEANS variety/DUNCAN ALPHA=0.01; TITLE 'Duncan Multiple comaprisons for the main effects'; MEANS pestcide/DUNCAN ALPHA=0.01; PROC MIXED METHOD=TYPE3;CLASS variety pestcide; MODEL y = pestcide; random variety variety*pestcide; LSMEANS pestcide/DIFF CL; TITLE 'pseticide with PROC MIXED';