Clean

rm(list = ls()); graphics.off()

Set R packages path and load packages

.libPaths("C:/Rpack")
library(RVAideMemoire)  #cochran.qtest
## *** Package RVAideMemoire v 0.9-81-2 ***
library(FactoMineR)
library(EnvStats)  #random test
## 
## Attaching package: 'EnvStats'
## The following objects are masked from 'package:RVAideMemoire':
## 
##     cv, elogis
## The following objects are masked from 'package:stats':
## 
##     predict, predict.lm
## The following object is masked from 'package:base':
## 
##     print.default
library(openxlsx)

Import data

CATA_Raw <- read.xlsx("CATAdata.xlsx", sheet = 1, rowNames = F)

Generate CATA contigency data

CATA_Raw$product <- as.factor(CATA_Raw$product)
conti.tab <- aggregate(.~product, FUN=sum, data=CATA_Raw)
mean.lik <- aggregate(.~product, FUN=mean, data=CATA_Raw)
lik_CATA <- data.frame(liking = mean.lik[,3], conti.tab[,-(1:3)])
rownames(lik_CATA) <- mean.lik$product

head(CATA_Raw) 
##   assessor      product liking sweet complex familiar bitter balanced citrus
## 1        1 E_applejuice      6     1       0        0      0        0      0
## 2        2 E_applejuice      9     0       0        0      0        1      1
## 3        3 E_applejuice      6     0       0        0      0        0      0
## 4        4 E_applejuice      6     1       0        0      0        0      0
## 5        5 E_applejuice      8     0       1        0      0        0      0
## 6        7 E_applejuice      7     1       0        0      0        0      0
##   cosy prickly novel artificial exclusive summery unique fruity sour refreshing
## 1    0       0     0          0         0       0      0      0    1          0
## 2    0       0     0          0         0       1      0      1    0          1
## 3    0       0     0          0         0       0      0      1    1          1
## 4    0       0     0          0         0       1      0      1    1          0
## 5    1       1     0          0         1       0      0      1    0          1
## 6    0       0     0          0         0       1      0      0    0          1
##   watery simple powerful typical.Danish
## 1      1      1        0              0
## 2      0      0        0              0
## 3      0      0        0              0
## 4      0      1        0              0
## 5      0      0        0              0
## 6      0      0        0              0
head(lik_CATA)
##               liking sweet complex familiar bitter balanced citrus cosy prickly
## E_applejuice    7.06    18       5        5      2       14     11    6       2
## E_orangejuice   6.06     4       2       20      5        3     21    1       5
## E_pure          2.36     0       3        0     27        0     19    0      13
## N_aronia        5.58     2       8        1      8        3     22    2       8
## N_beetroot      6.36    17       9        2      2       10      3    6       1
## N_rosehip       5.88     8       7        3      5        4     15    7       5
##               novel artificial exclusive summery unique fruity sour refreshing
## E_applejuice      0          3         3      23      2     23   17         28
## E_orangejuice     0          5         0      13      0     21   23         17
## E_pure            4          7         3       0      2      3   44          5
## N_aronia          6          3         6      10      5     14   42         19
## N_beetroot        6          3         2      13      5     18   15         21
## N_rosehip         2          5         5      12      7     23   31         18
##               watery simple powerful typical.Danish
## E_applejuice      13     10        3              1
## E_orangejuice      7     12        8              6
## E_pure             4      2       19              0
## N_aronia           3      2       12              1
## N_beetroot         5      9        3              2
## N_rosehip          0      1       24              0

(optional)

CATA_Raw <- as.data.frame(CATA_Raw)

Check data

How many times an attribute was checked (e.g., sweet)

aggregate(sweet~product, FUN=sum, data=CATA_Raw)
##         product sweet
## 1  E_applejuice    18
## 2 E_orangejuice     4
## 3        E_pure     0
## 4      N_aronia     2
## 5    N_beetroot    17
## 6     N_rosehip     8
## 7       R_omegn    18

Cochran’s Q Test (e.g., sweet)

cochran.qtest(sweet~product|assessor, CATA_Raw)
## 
##  Cochran's Q test
## 
## data:  sweet by product, block = assessor 
## Q = 54.2449, df = 6, p-value = 6.584e-10
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.36                         0.08 
##        proba in group E_pure      proba in group N_aronia 
##                         0.00                         0.04 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.34                         0.16 
##       proba in group R_omegn 
##                         0.36 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice    E_pure  N_aronia N_beetroot
## E_orangejuice    1.362e-03             -         -         -          -
## E_pure           8.011e-05      0.175000         -         -          -
## N_aronia         6.088e-04      0.802083 6.176e-01         -          -
## N_beetroot       1.000e+00      0.004935 1.068e-04 0.0009613          -
## N_rosehip        4.557e-03      0.451172 1.491e-02 0.1054688    0.06152
## R_omegn          1.000e+00      0.001362 8.011e-05 0.0006088    1.00000
##               N_rosehip
## E_orangejuice         -
## E_pure                -
## N_aronia              -
## N_beetroot            -
## N_rosehip             -
## R_omegn         0.06686
## 
## P value adjustment method: fdr

Cochran’s Q Test (all attribues)

for (i in CATA_Raw[4:23]) {
  print(cochran.qtest(i~product|assessor, CATA_Raw))
}
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 54.2449, df = 6, p-value = 6.584e-10
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.36                         0.08 
##        proba in group E_pure      proba in group N_aronia 
##                         0.00                         0.04 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.34                         0.16 
##       proba in group R_omegn 
##                         0.36 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice    E_pure  N_aronia N_beetroot
## E_orangejuice    1.362e-03             -         -         -          -
## E_pure           8.011e-05      0.175000         -         -          -
## N_aronia         6.088e-04      0.802083 6.176e-01         -          -
## N_beetroot       1.000e+00      0.004935 1.068e-04 0.0009613          -
## N_rosehip        4.557e-03      0.451172 1.491e-02 0.1054688    0.06152
## R_omegn          1.000e+00      0.001362 8.011e-05 0.0006088    1.00000
##               N_rosehip
## E_orangejuice         -
## E_pure                -
## N_aronia              -
## N_beetroot            -
## N_rosehip             -
## R_omegn         0.06686
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 15.9545, df = 6, p-value = 0.014
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.10                         0.04 
##        proba in group E_pure      proba in group N_aronia 
##                         0.06                         0.16 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.18                         0.14 
##       proba in group R_omegn 
##                         0.00 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice E_pure N_aronia N_beetroot N_rosehip
## E_orangejuice       0.6562             -      -        -          -         -
## E_pure              0.9035        1.0000      -        -          -         -
## N_aronia            0.7109        0.2461 0.4193        -          -         -
## N_beetroot          0.6848        0.2461 0.3281  1.00000          -         -
## N_rosehip           0.9035        0.3281 0.5518  1.00000    0.90348         -
## R_omegn             0.2461        0.7109 0.5250  0.08203    0.08203    0.1094
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 70.0909, df = 6, p-value = 3.917e-13
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.10                         0.40 
##        proba in group E_pure      proba in group N_aronia 
##                         0.00                         0.02 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.04                         0.06 
##       proba in group R_omegn 
##                         0.02 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice E_pure N_aronia N_beetroot N_rosehip
## E_orangejuice     0.009098             -      -        -          -         -
## E_pure            0.187500     0.0000267      -        -          -         -
## N_aronia          0.510417     0.0000267 1.0000        -          -         -
## N_beetroot        0.807692     0.0002103 0.8077   1.0000          -         -
## N_rosehip         0.962500     0.0003204 0.5250   0.8077          1         -
## R_omegn           0.510417     0.0000267 1.0000   1.0000          1    0.9375
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 87.4426, df = 6, p-value < 2.2e-16
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.04                         0.10 
##        proba in group E_pure      proba in group N_aronia 
##                         0.54                         0.16 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.04                         0.10 
##       proba in group R_omegn 
##                         0.00 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice    E_pure N_aronia N_beetroot
## E_orangejuice    5.613e-01             -         -        -          -
## E_pure           4.172e-07     0.0002311         -        -          -
## N_aronia         8.203e-02     0.5612664 2.311e-04        -          -
## N_beetroot       1.000e+00     0.5612664 4.172e-07  0.20881          -
## N_rosehip        5.613e-01     1.0000000 1.565e-05  0.56127     0.5613
## R_omegn          5.613e-01     0.1312500 3.129e-07  0.02344     0.5613
##               N_rosehip
## E_orangejuice         -
## E_pure                -
## N_aronia              -
## N_beetroot            -
## N_rosehip             -
## R_omegn          0.1313
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 30.12, df = 6, p-value = 3.73e-05
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.28                         0.06 
##        proba in group E_pure      proba in group N_aronia 
##                         0.00                         0.06 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.20                         0.08 
##       proba in group R_omegn 
##                         0.06 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice  E_pure N_aronia N_beetroot N_rosehip
## E_orangejuice     0.031018             -       -        -          -         -
## E_pure            0.002563        0.3750       -        -          -         -
## N_aronia          0.023926        1.0000 0.37500        -          -         -
## N_beetroot        0.704823        0.2153 0.02051   0.1718          -         -
## N_rosehip         0.074448        1.0000 0.26250   1.0000     0.3428         -
## R_omegn           0.031018        1.0000 0.37500   1.0000     0.1718         1
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 44.7812, df = 6, p-value = 5.173e-08
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.22                         0.42 
##        proba in group E_pure      proba in group N_aronia 
##                         0.38                         0.44 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.06                         0.30 
##       proba in group R_omegn 
##                         0.04 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice    E_pure  N_aronia N_beetroot
## E_orangejuice      0.07243             -         -         -          -
## E_pure             0.21614     0.9105190         -         -          -
## N_aronia           0.05587     1.0000000 0.7555402         -          -
## N_beetroot         0.07243     0.0005074 0.0005074 0.0001469          -
## N_rosehip          0.59378     0.3684464 0.5937841 0.3150594    0.01097
## R_omegn            0.05241     0.0001469 0.0004005 0.0001469    1.00000
##               N_rosehip
## E_orangejuice         -
## E_pure                -
## N_aronia              -
## N_beetroot            -
## N_rosehip             -
## R_omegn         0.00293
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 13.25, df = 6, p-value = 0.03923
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.12                         0.02 
##        proba in group E_pure      proba in group N_aronia 
##                         0.00                         0.04 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.12                         0.14 
##       proba in group R_omegn 
##                         0.08 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice E_pure N_aronia N_beetroot N_rosehip
## E_orangejuice       0.3750             -      -        -          -         -
## E_pure              0.2188        1.0000      -        -          -         -
## N_aronia            0.6070        1.0000 0.8203        -          -         -
## N_beetroot          1.0000        0.3750 0.2188   0.5104          -         -
## N_rosehip           1.0000        0.3691 0.2188   0.4717     1.0000         -
## R_omegn             0.9895        0.7159 0.3750   0.9895     0.9895    0.8203
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 29.6552, df = 6, p-value = 4.571e-05
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.04                         0.10 
##        proba in group E_pure      proba in group N_aronia 
##                         0.26                         0.16 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.02                         0.10 
##       proba in group R_omegn 
##                         0.00 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice   E_pure N_aronia N_beetroot N_rosehip
## E_orangejuice      0.63438             -        -        -          -         -
## E_pure             0.04102        0.1458        -        -          -         -
## N_aronia           0.14766        0.6403 0.431058        -          -         -
## N_beetroot         1.00000        0.3828 0.005127  0.06563          -         -
## N_rosehip          0.63438        1.0000 0.135010  0.64030     0.3828         -
## R_omegn            0.64030        0.1458 0.005127  0.04102     1.0000    0.1458
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 20.4255, df = 6, p-value = 0.002325
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.00                         0.00 
##        proba in group E_pure      proba in group N_aronia 
##                         0.08                         0.12 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.12                         0.04 
##       proba in group R_omegn 
##                         0.00 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice E_pure N_aronia N_beetroot N_rosehip
## E_orangejuice       1.0000             -      -        -          -         -
## E_pure              0.2917        0.2917      -        -          -         -
## N_aronia            0.1094        0.1094 0.8975        -          -         -
## N_beetroot          0.1094        0.1094 0.8975   1.0000          -         -
## N_rosehip           0.7500        0.7500 0.8750   0.4176     0.4176         -
## R_omegn             1.0000        1.0000 0.2917   0.1094     0.1094      0.75
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 7.4667, df = 6, p-value = 0.2798
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.06                         0.10 
##        proba in group E_pure      proba in group N_aronia 
##                         0.14                         0.06 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.06                         0.10 
##       proba in group R_omegn 
##                         0.18 
## 
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 10.8462, df = 6, p-value = 0.09325
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.06                         0.00 
##        proba in group E_pure      proba in group N_aronia 
##                         0.06                         0.12 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.04                         0.10 
##       proba in group R_omegn 
##                         0.02 
## 
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 33.8571, df = 6, p-value = 7.168e-06
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.46                         0.26 
##        proba in group E_pure      proba in group N_aronia 
##                         0.00                         0.20 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.26                         0.24 
##       proba in group R_omegn 
##                         0.24 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice   E_pure N_aronia N_beetroot N_rosehip
## E_orangejuice    1.002e-01             -        -        -          -         -
## E_pure           5.007e-06      0.001709        -        -          -         -
## N_aronia         1.328e-02      0.980924 0.006836        -          -         -
## N_beetroot       6.486e-02      1.000000 0.001709   0.9809          -         -
## N_rosehip        4.483e-02      1.000000 0.002051   1.0000          1         -
## R_omegn          4.483e-02      1.000000 0.002051   1.0000          1         1
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 16.5, df = 6, p-value = 0.01131
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.04                         0.00 
##        proba in group E_pure      proba in group N_aronia 
##                         0.04                         0.10 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.10                         0.14 
##       proba in group R_omegn 
##                         0.00 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice E_pure N_aronia N_beetroot N_rosehip
## E_orangejuice       0.6562             -      -        -          -         -
## E_pure              1.0000        0.6562      -        -          -         -
## N_aronia            0.6562        0.2188 0.6562        -          -         -
## N_beetroot          0.6562        0.2188 0.6562   1.0000          -         -
## N_rosehip           0.3281        0.1641 0.3281   0.8477     0.8477         -
## R_omegn             0.6562        1.0000 0.6562   0.2188     0.2188    0.1641
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 32.972, df = 6, p-value = 1.062e-05
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.46                         0.42 
##        proba in group E_pure      proba in group N_aronia 
##                         0.06                         0.28 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.36                         0.46 
##       proba in group R_omegn 
##                         0.20 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice    E_pure N_aronia N_beetroot
## E_orangejuice    0.8983123             -         -        -          -
## E_pure           0.0002303     0.0002804         -        -          -
## N_aronia         0.1778121     0.2698799 0.0310181        -          -
## N_beetroot       0.5366344     0.7555402 0.0078206   0.5614          -
## N_rosehip        1.0000000     0.8983123 0.0002804   0.1645     0.5366
## R_omegn          0.0318661     0.0698347 0.0911458   0.5614     0.2342
##               N_rosehip
## E_orangejuice         -
## E_pure                -
## N_aronia              -
## N_beetroot            -
## N_rosehip             -
## R_omegn         0.03187
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 109.5849, df = 6, p-value < 2.2e-16
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.34                         0.46 
##        proba in group E_pure      proba in group N_aronia 
##                         0.88                         0.84 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.30                         0.62 
##       proba in group R_omegn 
##                         0.04 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice    E_pure  N_aronia N_beetroot
## E_orangejuice    1.985e-01             -         -         -          -
## E_pure           4.873e-06     1.149e-04         -         -          -
## N_aronia         4.873e-06     3.287e-04 8.145e-01         -          -
## N_beetroot       8.145e-01     1.189e-01 2.193e-06 4.873e-06          -
## N_rosehip        3.865e-03     1.561e-01 1.008e-02 4.553e-02   0.003865
## R_omegn          1.391e-03     5.101e-05 9.550e-12 1.910e-11   0.001709
##               N_rosehip
## E_orangejuice         -
## E_pure                -
## N_aronia              -
## N_beetroot            -
## N_rosehip             -
## R_omegn       2.086e-07
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 40.9275, df = 6, p-value = 2.992e-07
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.56                         0.34 
##        proba in group E_pure      proba in group N_aronia 
##                         0.10                         0.38 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.42                         0.36 
##       proba in group R_omegn 
##                         0.12 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice   E_pure N_aronia N_beetroot N_rosehip
## E_orangejuice    9.184e-02             -        -        -          -         -
## E_pure           3.254e-05       0.01583        -        -          -         -
## N_aronia         1.027e-01       0.97862 0.000761        -          -         -
## N_beetroot       3.151e-01       0.73285 0.000761  0.97862          -         -
## N_rosehip        9.184e-02       1.00000 0.009098  1.00000   0.797001         -
## R_omegn          1.101e-04       0.01583 1.000000  0.01328   0.009098   0.01583
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 128.2629, df = 6, p-value < 2.2e-16
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.26                         0.14 
##        proba in group E_pure      proba in group N_aronia 
##                         0.08                         0.06 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.10                         0.00 
##       proba in group R_omegn 
##                         0.78 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice    E_pure  N_aronia N_beetroot
## E_orangejuice    3.152e-01             -         -         -          -
## E_pure           4.717e-02     6.780e-01         -         -          -
## N_aronia         5.127e-03     4.512e-01 1.000e+00         -          -
## N_beetroot       1.344e-01     8.333e-01 1.000e+00 8.333e-01          -
## N_rosehip        7.324e-04     3.646e-02 2.019e-01 3.500e-01  1.193e-01
## R_omegn          7.562e-07     8.153e-08 4.075e-10 3.056e-10  5.653e-09
##               N_rosehip
## E_orangejuice         -
## E_pure                -
## N_aronia              -
## N_beetroot            -
## N_rosehip             -
## R_omegn        7.64e-11
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 63.6596, df = 6, p-value = 8.099e-12
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.20                         0.24 
##        proba in group E_pure      proba in group N_aronia 
##                         0.04                         0.04 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.18                         0.02 
##       proba in group R_omegn 
##                         0.50 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice    E_pure  N_aronia N_beetroot
## E_orangejuice     0.976534             -         -         -          -
## E_pure            0.058594      0.013330         -         -          -
## N_aronia          0.058594      0.013330 1.000e+00         -          -
## N_beetroot        1.000000      0.825640 9.160e-02 5.859e-02          -
## N_rosehip         0.010254      0.010254 1.000e+00 1.000e+00   0.014915
## R_omegn           0.003593      0.008224 2.503e-06 1.085e-05   0.003593
##               N_rosehip
## E_orangejuice         -
## E_pure                -
## N_aronia              -
## N_beetroot            -
## N_rosehip             -
## R_omegn       2.503e-06
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 66.2745, df = 6, p-value = 2.368e-12
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.06                         0.16 
##        proba in group E_pure      proba in group N_aronia 
##                         0.38                         0.24 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.06                         0.48 
##       proba in group R_omegn 
##                         0.00 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice    E_pure N_aronia N_beetroot
## E_orangejuice    2.358e-01             -         -        -          -
## E_pure           1.409e-03      0.026724         -        -          -
## N_aronia         3.628e-02      0.360938 1.777e-01        -          -
## N_beetroot       1.000e+00      0.235840 1.409e-03 0.036283          -
## N_rosehip        3.004e-05      0.004053 3.335e-01 0.032265  3.004e-05
## R_omegn          2.917e-01      0.018229 3.004e-05 0.001465  2.917e-01
##               N_rosehip
## E_orangejuice         -
## E_pure                -
## N_aronia              -
## N_beetroot            -
## N_rosehip             -
## R_omegn       2.503e-06
## 
## P value adjustment method: fdr
## 
##  Cochran's Q test
## 
## data:  i by product, block = assessor 
## Q = 19.4, df = 6, p-value = 0.003539
## alternative hypothesis: true difference in probabilities is not equal to 0 
## sample estimates:
##  proba in group E_applejuice proba in group E_orangejuice 
##                         0.02                         0.12 
##        proba in group E_pure      proba in group N_aronia 
##                         0.00                         0.02 
##    proba in group N_beetroot     proba in group N_rosehip 
##                         0.04                         0.00 
##       proba in group R_omegn 
##                         0.00 
## 
##         Pairwise comparisons using Wilcoxon sign test
## 
##               E_applejuice E_orangejuice E_pure N_aronia N_beetroot N_rosehip
## E_orangejuice        0.525             -      -        -          -         -
## E_pure               1.000        0.2188      -        -          -         -
## N_aronia             1.000        0.5250      1        -          -         -
## N_beetroot           1.000        1.0000      1        1          -         -
## N_rosehip            1.000        0.2188      1        1          1         -
## R_omegn              1.000        0.2188      1        1          1         1
## 
## P value adjustment method: fdr

Correspondence Analysis (CA)

Run CA

Model1 <- CA(lik_CATA, col.sup=c(1), graph = FALSE)
Model1$eig # check variance explained per CA dimension
##       eigenvalue percentage of variance cumulative percentage of variance
## dim 1 0.33246779              54.151808                          54.15181
## dim 2 0.13675710              22.274772                          76.42658
## dim 3 0.09120873              14.855929                          91.28251
## dim 4 0.02503942               4.078379                          95.36089
## dim 5 0.01535474               2.500956                          97.86184
## dim 6 0.01312732               2.138157                         100.00000

Plot CA results

Explained variance

windows(10,10)
explVar <- data.frame(No.comp = 1:6, explVar = Model1$eig[,3])
barplot(explVar[,2] ~ explVar[,1], xlab = "# components", ylab = "Explained variance (%)")

CA plots

windows(10,10)
plot.CA(Model1, axes=c(1, 2), col.row="blue", col.col="red", label=c("col", "col.sup", "row", "row.sup"),
        graph.type = "classic")

Penalty-lift analysis (PLA)

Load R sources

source("Penalty_lift_Rnd1.R")
source("PLA_plot2.R")   #rnd test, savePlot: tiff, pdf

Run PLA

res.PenL <- Penalty_lift_Rnd1(CATA_Raw)
res.PenL <- res.PenL[order(res.PenL$Penalty.lift),]
windows(10,10)
PLA_plot2(res.PenL, 1, 1, -3, 3) #data, pvalue, Liking-Satiation-Satiety-Portion