data fat; input block treat fat; label block ='patient' fat='fat excretion'; lines; 1 1 44.5 1 2 7.3 1 3 3.4 1 4 12.4 2 1 33.0 2 2 21.0 2 3 23.1 2 4 25.4 3 1 19.1 3 2 5.0 3 3 11.8 3 4 22.0 4 1 9.4 4 2 4.6 4 3 4.6 4 4 5.8 5 1 71.3 5 2 23.3 5 3 25.6 5 4 68.2 6 1 51.2 6 2 38.0 6 3 36.0 6 4 52.6 run; proc format; value treat 1='control' 2='tablet' 3='capsule' 4='enteric-tablet'; run; proc glm; class block treat; model fat=treat block; means treat/tukey; format treat treat.; title 'Example of Randomized Block Design'; title2 'Data from Table 10.11, P. 447 of Fisher and van Belle'; run; /*Friedman's test bases on SAS PROC FREQ, CMH2 option. The ANOVA or Row Mean Scores Differ CMH statistic is Friedman's test if there is ONLY ONE response per treatment-block combination. */ proc freq data=fat; tables block*treat*fat / cmh2 scores=rank noprint; run;