Đánh giá sự đồng thuận của các thành viên hội đồng *Phân tích phương sai hai chiều ANOVA:

Một phần của tài liệu Báo cáo phân tích thống kê và xử lý số liệu (Trang 26 - 33)

IV. Đối với số liệu senschoc

2. Đánh giá sự đồng thuận của các thành viên hội đồng *Phân tích phương sai hai chiều ANOVA:

*Phân tích phương sai hai chiều ANOVA:

>choc=gl(222,6,1332) > lchoc=gl(6,222,1332) > id=1:1332 >score=c(j1,j2,j3,j4,j5,j6,j7,j8,j9,j10,j11,j12,j13,j14,j15,j16,j17,j18,j19,j20,j21, +j22,j23,j24,j25,j26,j27,j28,j29,j30,j31,j32,j33,j34,j35,j36,j37,j38,j39,j40, +j41,j42,j43,j44,j45,j46,j47,j48,j49,j50,j51,j52,j53,j54,j55,j56,j57,j58,j59,j60, +j61,j62,j63,j64,j65,j66,j67,j68,j69,j70,j71,j72,j73,j74,j75,j76,j77,j78,j79, +j80,j81,j82,j83,j84,j85,j86,j87,j88,j89,j90,j91,j92,j93,j94,j95,j96,j97,j98,j99, +j100,j101,j102,j103,j104,j105,j106,j107,j108,j109,j110,j111,j112,j113,j114, +j115,j116,j117,j118,j119,j120,j121,j122,j123,j124,j125,j126,j127,j128,j129,j130,j131,j +132,j133,j134, +j135,j136,j137,j138,j139,j140,j141,j142,j143,j144,j145,j146,j147,j148,j149,j150,j151, +j152,j153,j154,j155,j156,j157,j158,j159,j160,j161,j162,j163,j164,j165,j166,j167, +j168,j169,j170,j171,j172,j173,j174,j175,j176,j177,j178,j179,j180,j181,j182,j183, +j184,j185,j186,j187,j188,j189,j190,j191,j192,j193,j194,j195,j196,j197,j198,j199, +j200,j201,j202,j203,j204,j205,j206,j207,j208,j209,j210,j211,j212,j213,j214,j215, +j216,j217,j218,j219,j220,j221,j222) > data=data.frame(choc,lchoc,score,id) > attach(data)

Trang | 27 > twoway= lm(score~choc+lchoc)

> anova(twoway )

*Các số liệu phân tích sự khác biệt giữa các thành viên hội đồng với nhau:

Residuals:

Min 1Q Median 3Q Max -6.1667 -1.1667 0.1667 1.3333 5.6667

Coefficients: (221 not defined because of singularities) Estimate Std. Error t value Pr(>|t|)

(Intercept) 5.167e+00 8.536e-01 6.053 1.94e-09 *** choc[T.2] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.3] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.4] -1.167e+00 1.207e+00 -0.966 0.33403 choc[T.5] -8.333e-01 1.207e+00 -0.690 0.49014 choc[T.6] 1.333e+00 1.207e+00 1.105 0.26961 choc[T.7] -1.500e+00 1.207e+00 -1.243 0.21429 choc[T.8] -2.942e-15 1.207e+00 0.000 1.00000 choc[T.9] -2.779e-15 1.207e+00 0.000 1.00000 choc[T.10] -1.500e+00 1.207e+00 -1.243 0.21429 choc[T.11] -1.000e+00 1.207e+00 -0.828 0.40763 choc[T.12] 3.333e-01 1.207e+00 0.276 0.78250 choc[T.13] -1.167e+00 1.207e+00 -0.966 0.33403 choc[T.14] -2.167e+00 1.207e+00 -1.795 0.07295 . choc[T.15] -2.500e+00 1.207e+00 -2.071 0.03859 * choc[T.16] 1.667e-01 1.207e+00 0.138 0.89021 choc[T.17] -1.667e-01 1.207e+00 -0.138 0.89021 choc[T.18] -5.000e-01 1.207e+00 -0.414 0.67881 choc[T.19] -8.333e-01 1.207e+00 -0.690 0.49014 choc[T.20] -1.833e+00 1.207e+00 -1.519 0.12912 choc[T.21] -2.167e+00 1.207e+00 -1.795 0.07295 . choc[T.22] -5.000e-01 1.207e+00 -0.414 0.67881 choc[T.23] 1.667e-01 1.207e+00 0.138 0.89021 choc[T.24] -1.333e+00 1.207e+00 -1.105 0.26961 choc[T.25] 2.500e+00 1.207e+00 2.071 0.03859 * choc[T.26] 2.000e+00 1.207e+00 1.657 0.09785 . choc[T.27] 2.667e+00 1.207e+00 2.209 0.02738 * choc[T.28] 2.167e+00 1.207e+00 1.795 0.07295 . choc[T.29] 2.000e+00 1.207e+00 1.657 0.09785 . choc[T.30] 1.667e+00 1.207e+00 1.381 0.16767 choc[T.31] 8.333e-01 1.207e+00 0.690 0.49014 choc[T.32] 1.167e+00 1.207e+00 0.966 0.33403 choc[T.33] 8.333e-01 1.207e+00 0.690 0.49014 choc[T.34] 2.000e+00 1.207e+00 1.657 0.09785 . choc[T.35] 1.333e+00 1.207e+00 1.105 0.26961 choc[T.36] 2.167e+00 1.207e+00 1.795 0.07295 . choc[T.37] 2.167e+00 1.207e+00 1.795 0.07295 . choc[T.38] 1.667e+00 1.207e+00 1.381 0.16767

Trang | 28 choc[T.39] 1.667e+00 1.207e+00 1.381 0.16767

choc[T.40] 3.167e+00 1.207e+00 2.623 0.00883 ** choc[T.41] -2.840e-15 1.207e+00 0.000 1.00000 choc[T.42] 2.833e+00 1.207e+00 2.347 0.01910 * choc[T.43] 3.000e+00 1.207e+00 2.485 0.01310 * choc[T.44] 2.167e+00 1.207e+00 1.795 0.07295 . choc[T.45] 1.500e+00 1.207e+00 1.243 0.21429 choc[T.46] 3.500e+00 1.207e+00 2.899 0.00381 ** choc[T.47] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.48] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.49] -6.667e-01 1.207e+00 -0.552 0.58088 choc[T.50] 8.333e-01 1.207e+00 0.690 0.49014 choc[T.51] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.52] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.53] -8.333e-01 1.207e+00 -0.690 0.49014 choc[T.47] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.48] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.49] -6.667e-01 1.207e+00 -0.552 0.58088 choc[T.50] 8.333e-01 1.207e+00 0.690 0.49014 choc[T.51] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.52] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.53] -8.333e-01 1.207e+00 -0.690 0.49014 choc[T.54] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.55] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.56] 1.333e+00 1.207e+00 1.105 0.26961 choc[T.57] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.58] 3.333e-01 1.207e+00 0.276 0.78250 choc[T.59] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.60] -6.667e-01 1.207e+00 -0.552 0.58088 choc[T.61] 1.000e+00 1.207e+00 0.828 0.40763 choc[T.62] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.63] -1.333e+00 1.207e+00 -1.105 0.26961 choc[T.64] -2.862e-15 1.207e+00 0.000 1.00000 choc[T.65] -6.667e-01 1.207e+00 -0.552 0.58088 choc[T.66] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.67] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.68] -3.000e+00 1.207e+00 -2.485 0.01310 * choc[T.69] -1.333e+00 1.207e+00 -1.105 0.26961 choc[T.70] 2.500e+00 1.207e+00 2.071 0.03859 * choc[T.71] 1.667e+00 1.207e+00 1.381 0.16767 choc[T.72] 1.500e+00 1.207e+00 1.243 0.21429 choc[T.73] 1.667e-01 1.207e+00 0.138 0.89021 choc[T.74] 1.833e+00 1.207e+00 1.519 0.12912 choc[T.75] -1.500e+00 1.207e+00 -1.243 0.21429 choc[T.76] -3.333e-01 1.207e+00 -0.276 0.78250 choc[T.77] -2.667e+00 1.207e+00 -2.209 0.02738 * choc[T.78] 2.500e+00 1.207e+00 2.071 0.03859 * choc[T.79] -3.333e-01 1.207e+00 -0.276 0.78250 choc[T.80] -2.863e-15 1.207e+00 0.000 1.00000

Trang | 29 choc[T.81] -3.333e-01 1.207e+00 -0.276 0.78250

choc[T.82] 1.333e+00 1.207e+00 1.105 0.26961 choc[T.83] 1.333e+00 1.207e+00 1.105 0.26961 choc[T.84] -1.667e-01 1.207e+00 -0.138 0.89021 choc[T.85] 2.833e+00 1.207e+00 2.347 0.01910 * choc[T.86] 8.333e-01 1.207e+00 0.690 0.49014 choc[T.87] 3.500e+00 1.207e+00 2.899 0.00381 ** choc[T.88] -5.000e-01 1.207e+00 -0.414 0.67881 choc[T.89] -1.000e+00 1.207e+00 -0.828 0.40763 choc[T.90] -2.167e+00 1.207e+00 -1.795 0.07295 . choc[T.91] 1.667e+00 1.207e+00 1.381 0.16767 choc[T.92] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.93] 3.333e-01 1.207e+00 0.276 0.78250 choc[T.94] 1.667e+00 1.207e+00 1.381 0.16767 choc[T.95] -2.000e+00 1.207e+00 -1.657 0.09785 . choc[T.96] -1.833e+00 1.207e+00 -1.519 0.12912 choc[T.97] 1.833e+00 1.207e+00 1.519 0.12912 choc[T.98] 1.667e-01 1.207e+00 0.138 0.89021 choc[T.99] -1.167e+00 1.207e+00 -0.966 0.33403 choc[T.100] -5.000e-01 1.207e+00 -0.414 0.67881 choc[T.101] -5.000e-01 1.207e+00 -0.414 0.67881 choc[T.102] -2.550e-15 1.207e+00 0.000 1.00000 choc[T.103] -6.667e-01 1.207e+00 -0.552 0.58088 choc[T.104] -1.167e+00 1.207e+00 -0.966 0.33403 choc[T.105] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.106] -3.333e-01 1.207e+00 -0.276 0.78250 choc[T.107] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.108] -1.000e+00 1.207e+00 -0.828 0.40763 choc[T.109] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.110] 1.000e+00 1.207e+00 0.828 0.40763 choc[T.111] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.112] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.113] -3.333e-01 1.207e+00 -0.276 0.78250 choc[T.114] 2.167e+00 1.207e+00 1.795 0.07295 . choc[T.115] 2.000e+00 1.207e+00 1.657 0.09785 . choc[T.116] 2.833e+00 1.207e+00 2.347 0.01910 * choc[T.117] 1.500e+00 1.207e+00 1.243 0.21429 choc[T.118] 3.333e-01 1.207e+00 0.276 0.78250 choc[T.119] -3.333e-01 1.207e+00 -0.276 0.78250 choc[T.120] 1.833e+00 1.207e+00 1.519 0.12912 choc[T.121] -5.000e-01 1.207e+00 -0.414 0.67881 choc[T.122] -2.490e-15 1.207e+00 0.000 1.00000 choc[T.123] 2.000e+00 1.207e+00 1.657 0.09785 . choc[T.124] -3.497e-15 1.207e+00 0.000 1.00000 choc[T.125] 1.167e+00 1.207e+00 0.966 0.33403 choc[T.126] 3.333e-01 1.207e+00 0.276 0.78250 choc[T.127] 1.000e+00 1.207e+00 0.828 0.40763 choc[T.128] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.129] 1.500e+00 1.207e+00 1.243 0.21429

Trang | 30 choc[T.130] 3.333e-01 1.207e+00 0.276 0.78250

choc[T.131] 1.000e+00 1.207e+00 0.828 0.40763 choc[T.132] 8.333e-01 1.207e+00 0.690 0.49014 choc[T.133] -8.333e-01 1.207e+00 -0.690 0.49014 choc[T.134] -1.833e+00 1.207e+00 -1.519 0.12912 choc[T.135] 1.500e+00 1.207e+00 1.243 0.21429 choc[T.136] 1.333e+00 1.207e+00 1.105 0.26961 choc[T.137] 1.667e-01 1.207e+00 0.138 0.89021 choc[T.138] 2.167e+00 1.207e+00 1.795 0.07295 . choc[T.139] 3.333e-01 1.207e+00 0.276 0.78250 choc[T.140] -8.333e-01 1.207e+00 -0.690 0.49014 choc[T.141] -1.167e+00 1.207e+00 -0.966 0.33403 choc[T.142] -1.667e-01 1.207e+00 -0.138 0.89021 choc[T.143] -2.648e-15 1.207e+00 0.000 1.00000 choc[T.144] -5.000e-01 1.207e+00 -0.414 0.67881 choc[T.145] 2.167e+00 1.207e+00 1.795 0.07295 . choc[T.146] -5.000e-01 1.207e+00 -0.414 0.67881 choc[T.147] -6.667e-01 1.207e+00 -0.552 0.58088 choc[T.148] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.149] 2.500e+00 1.207e+00 2.071 0.03859 * choc[T.150] -3.333e-01 1.207e+00 -0.276 0.78250 choc[T.151] -1.667e-01 1.207e+00 -0.138 0.89021 choc[T.152] 2.333e+00 1.207e+00 1.933 0.05350 . choc[T.153] 1.667e-01 1.207e+00 0.138 0.89021 choc[T.154] -1.667e-01 1.207e+00 -0.138 0.89021 choc[T.155] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.156] 1.667e+00 1.207e+00 1.381 0.16767 choc[T.157] 3.333e-01 1.207e+00 0.276 0.78250 choc[T.158] 3.333e-01 1.207e+00 0.276 0.78250 choc[T.159] -1.000e+00 1.207e+00 -0.828 0.40763 choc[T.160] 1.667e-01 1.207e+00 0.138 0.89021 choc[T.161] 2.000e+00 1.207e+00 1.657 0.09785 . choc[T.162] 1.000e+00 1.207e+00 0.828 0.40763 choc[T.163] 2.333e+00 1.207e+00 1.933 0.05350 . choc[T.164] -4.124e-15 1.207e+00 0.000 1.00000 choc[T.165] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.166] 2.667e+00 1.207e+00 2.209 0.02738 * choc[T.167] 1.667e-01 1.207e+00 0.138 0.89021 choc[T.168] 2.167e+00 1.207e+00 1.795 0.07295 . choc[T.169] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.170] -8.333e-01 1.207e+00 -0.690 0.49014 choc[T.171] -3.333e-01 1.207e+00 -0.276 0.78250 choc[T.172] 1.833e+00 1.207e+00 1.519 0.12912 choc[T.173] -3.333e-01 1.207e+00 -0.276 0.78250 choc[T.174] 2.167e+00 1.207e+00 1.795 0.07295 . choc[T.175] -3.333e-01 1.207e+00 -0.276 0.78250 choc[T.176] 1.500e+00 1.207e+00 1.243 0.21429 choc[T.177] -2.695e-15 1.207e+00 0.000 1.00000 choc[T.178] -6.667e-01 1.207e+00 -0.552 0.58088

Trang | 31 choc[T.179] 1.333e+00 1.207e+00 1.105 0.26961

choc[T.180] -1.500e+00 1.207e+00 -1.243 0.21429 choc[T.181] -1.667e-01 1.207e+00 -0.138 0.89021 choc[T.182] 1.667e-01 1.207e+00 0.138 0.89021 choc[T.183] -1.333e+00 1.207e+00 -1.105 0.26961 choc[T.184] 1.000e+00 1.207e+00 0.828 0.40763 choc[T.185] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.186] -6.667e-01 1.207e+00 -0.552 0.58088 choc[T.187] 2.167e+00 1.207e+00 1.795 0.07295 . choc[T.188] 1.333e+00 1.207e+00 1.105 0.26961 choc[T.189] -8.333e-01 1.207e+00 -0.690 0.49014 choc[T.190] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.191] 1.333e+00 1.207e+00 1.105 0.26961 choc[T.192] 1.667e+00 1.207e+00 1.381 0.16767 choc[T.193] 1.000e+00 1.207e+00 0.828 0.40763 choc[T.194] 2.667e+00 1.207e+00 2.209 0.02738 * choc[T.195] -5.000e-01 1.207e+00 -0.414 0.67881 choc[T.196] 1.167e+00 1.207e+00 0.966 0.33403 choc[T.197] 1.833e+00 1.207e+00 1.519 0.12912 choc[T.198] 1.667e+00 1.207e+00 1.381 0.16767 choc[T.199] -3.434e-15 1.207e+00 0.000 1.00000 choc[T.200] 2.667e+00 1.207e+00 2.209 0.02738 * choc[T.201] 2.167e+00 1.207e+00 1.795 0.07295 . choc[T.202] 1.167e+00 1.207e+00 0.966 0.33403 choc[T.203] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.204] 2.333e+00 1.207e+00 1.933 0.05350 . choc[T.205] 1.333e+00 1.207e+00 1.105 0.26961 choc[T.206] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.207] 1.167e+00 1.207e+00 0.966 0.33403 choc[T.208] 2.333e+00 1.207e+00 1.933 0.05350 . choc[T.209] 2.000e+00 1.207e+00 1.657 0.09785 . choc[T.210] 2.000e+00 1.207e+00 1.657 0.09785 . choc[T.211] -3.333e-01 1.207e+00 -0.276 0.78250 choc[T.212] 2.500e+00 1.207e+00 2.071 0.03859 * choc[T.213] 5.000e-01 1.207e+00 0.414 0.67881 choc[T.214] -6.667e-01 1.207e+00 -0.552 0.58088 choc[T.215] 1.333e+00 1.207e+00 1.105 0.26961 choc[T.216] -3.263e-15 1.207e+00 0.000 1.00000 choc[T.217] -1.167e+00 1.207e+00 -0.966 0.33403 choc[T.218] 6.667e-01 1.207e+00 0.552 0.58088 choc[T.219] 8.333e-01 1.207e+00 0.690 0.49014 choc[T.220] -1.667e-01 1.207e+00 -0.138 0.89021 choc[T.221] -2.667e+00 1.207e+00 -2.209 0.02738 * choc[T.222] 1.667e-01 1.207e+00 0.138 0.89021

Trang | 32

3. Vẽ biểu đồ rada mô tả tiêu chuẩn của sản phẩm

>library(psych)

>webplot = function(data, data.row = NULL, y.cols = NULL, main = NULL, add = F, col = "red", lty = 1, scale = T) { if (!is.matrix(data) & !is.data.frame(data)) col = "red", lty = 1, scale = T) { if (!is.matrix(data) & !is.data.frame(data)) stop("Requires matrix or data.frame") if (is.null(y.cols)) y.cols = colnames(data)[sapply(data, is.numeric)] if (sum(!sapply(data[, y.cols], is.numeric)) > 0) { out = paste0("\"", colnames(data)[!sapply(data, is.numeric)], "\"", collapse = ", ") stop(paste0("All y.cols must be numeric\n", out, " are not numeric")) } if (is.null(data.row)) data.row = 1 if (is.character(data.row)) if (data.row %in% rownames(data)) { data.row = which(rownames(data) == data.row) } else { stop("Invalid value for data.row:\nMust be a valid rownames(data) or row-index value") } if (is.null(main)) main = rownames(data)[data.row] if (scale == T) { data = scale(data[, y.cols]) data = apply(data, 2, function(x) x/max(abs(x))) } data = as.data.frame(data) n.y = length(y.cols) min.rad = 360/n.y polar.vals = (90 + seq(0, 360, length.out = n.y + 1)) * pi/180 # if (add == F) { plot(0, xlim = c(-2.2, 2.2), ylim = c(-2.2, 2.2), type = "n", axes = F, xlab = "", ylab = "") title(main) lapply(polar.vals, function(x) lines(c(0, 2 * cos(x)), c(0, 2 * sin(x)))) lapply(1:n.y, function(x) text(2.15 * cos(polar.vals[x]), 2.15 * sin(polar.vals[x]), y.cols[x], cex = 0.8)) lapply(seq(0.5, 2, 0.5), function(x) lines(x * cos(seq(0, 2 * pi, length.out = 100)), x * sin(seq(0, 2 * pi, length.out = 100)), lwd = 0.5, lty = 2, col = "gray60")) lines(cos(seq(0, 2 * pi, length.out = 100)), sin(seq(0, 2 * pi, length.out = 100)), lwd = 1.2, col = "gray50") } r = 1 + data[data.row, y.cols] xs = r * cos(polar.vals) ys = r * sin(polar.vals) xs = c(xs, xs[1]) ys = c(ys, ys[1]) lines(xs, ys, col = col, lwd = 2, lty = lty) }

> choc1=subset(sensochoc,Product=="choc1") > summary(choc1) > summary(choc1) > choc2=subset(sensochoc,Product=="choc2") > summary(choc2) > choc3=subset(sensochoc,Product=="choc3") > summary(choc3) > choc4=subset(sensochoc,Product=="choc4") > summary(choc4) > choc5=subset(sensochoc,Product=="choc5") > summary(choc5) > choc6=subset(sensochoc,Product=="choc6") > summary(choc6) > par(mar = c(1, 1, 6, 1)) > webplot(choc1,main="Radar Chart")

> webplot(choc2,add = T, col = "blue", lty = 2) > webplot(choc3,add = T, col = "green") > webplot(choc3,add = T, col = "green")

> webplot(choc4,add = T, col = "violet", lty = 2) > webplot(choc5,add = T, col = "yellow", lty = 1) > webplot(choc5,add = T, col = "yellow", lty = 1)

Trang | 33

> webplot(choc6,add = T, col = "black", lty = 2) >legend("bottomright",lty=c(1,2,1,2,1,2),col=c("red","blue","green","violet","yellow", >legend("bottomright",lty=c(1,2,1,2,1,2),col=c("red","blue","green","violet","yellow", "black),c("choc1","choc2","choc3","choc4","choc5","choc6",bty="n"))

Một phần của tài liệu Báo cáo phân tích thống kê và xử lý số liệu (Trang 26 - 33)

Tải bản đầy đủ (PDF)

(33 trang)