options ls=75; /* Barley growth and salinity */ data one; input salinity $3. container @; do rep=1 to 3; input y @; output; end; cards; c 1 11.29 11.08 11.1 c 2 7.37 6.55 8.5 6b 1 5.64 5.98 5.69 6b 2 4.2 3.34 4.21 12b 1 4.83 4.77 5.66 12b 2 3.28 2.61 2.69 ; run; *proc mixed cl method=type3; proc mixed cl; class salinity container; model y=salinity/s cl ddfm=satterth; random container(salinity); lsmeans salinity/tdiff pdiff; run; goptions device=psepsf colors=(black); symbol1 value=diamond h=2; symbol2 value=plus h=2; axis1 value=(h=2) offset=(5); /*proc gplot; title "Barley growth by salinity trt"; plot y*salinity=container/haxis=axis1; run;*/ proc means data=one nway; class salinity container; var y; output out=meanz mean=ymean; run; proc glm data=meanz; class salinity; model ymean=salinity; run; proc glm data=one; title "wrong f-ratio (correct f-ratio obtained with TEST statement)"; class container salinity; model y=salinity container(salinity); * test h=salinity e=container(salinity); run;