> #5.4.1 Lemonade Example > #Note the data in Table 5.6 are transposed to that for chapter 3 > x<-cbind( + c(5,3,4,5,3,4,5,3,1,3), + c(2,5,3,2,5,3,2,5,4,1), + c(1,2,2,1,2,2,1,2,2,2), + c(3,1,5,3,1,5,3,1,5,4), + c(4,4,1,4,4,1,4,4,3,5)) > colnames(x)<-c("A","B","C","D","E") > x A B C D E [1,] 5 2 1 3 4 [2,] 3 5 2 1 4 [3,] 4 3 2 5 1 [4,] 5 2 1 3 4 [5,] 3 5 2 1 4 [6,] 4 3 2 5 1 [7,] 5 2 1 3 4 [8,] 3 5 2 1 4 [9,] 1 4 2 5 3 [10,] 3 1 2 4 5 > > xtotab(x) 1 2 3 4 5 A 1 0 4 2 3 B 1 3 2 1 3 C 3 7 0 0 0 D 3 0 3 1 3 E 2 0 1 6 1 > U(x) 1 2 3 4 5 1 10 0 0 0 0 2 0 10 0 0 0 3 0 0 10 0 0 4 0 0 0 10 0 5 0 0 0 0 10 > BlockAnalysis(x) $Cri Location Dispersion A 1.2 -3.380617e-01 B 0.4 6.796180e-16 C -2.6 -1.690309e-01 D 0.2 8.451543e-01 E 0.8 -3.380617e-01 $partition df SS pvalue Location 4 9.0400000 0.060107411 Dispersion 4 0.9714286 0.914096961 Residual 8 22.7885714 0.003646571 Total 16 32.8000000 0.007854323 > > xtotab3(x) 1 2 3 4 5 A 1 0 4 2 3 B 1 3 2 1 3 C 3 7 0 0 0 D 3 0 3 1 3 E 2 0 1 6 1 > OrderedBlockAnalysis(x) $Z [,1] [,2] [,3] [,4] [1,] -3.162278e-01 0.2672612 -1.8973666 -1.195229 [2,] 2.298447e+00 -0.4969293 -2.9933259 0.808122 [3,] -4.092302e-17 -0.5345225 0.3162278 -1.792843 [4,] -1.912366e+00 -0.6060915 0.8366600 -2.032893 $partition df Value pvalue Page 1 0.100000 0.751829634 Umbrella 1 5.282857 0.021536379 Residual 14 27.417143 0.016984116 Total 16 32.800000 0.007854323 >