**Wiekvoet**, and kindly contributed to R-bloggers)

In this post I will try to add an important parts in the sensory profiling model I have been building. This concerns the question: ‘Are all panelists equally reproducible?’. Obviously the answer is no, some are better than others. From this observation stems the approach in which under performing panelists are removed prior to the final analysis. The beauty of the Bayesian model is that this removal is not needed. The model can weigh down the panelists based on performance.

Finally, it could be chosen to introduce the concept that the data is not normal. An error distribution with fatter tails may give more robust results. For the current data, any look at the data will reveal that it is not normal. Panelists only use the numbers 0 to 10, suggesting a ordered logistic model, which is for another time. A continuous line scale with values 0 to 100 is used most often in sensory profiling. For a line scale using a t distribution rather than normal distribution can be appropriate. The beauty is, in the Bayesian model the data can be used to determine the degrees of freedom for the t distribution. To allow general application of the model I will leave the error normal though.

## Modelling panelists’ individual error

The model statements needed for this model part are taken from *Data analysis using regression and multilevel/hierarchical models*‘ by Gelman and Hill (2007).

First the error must be made panelist dependent:

y[i] ~ dnorm(fit[i],tau)

becomes

y[i] ~ dnorm(fit[i],tauPanelist[Panelist[i]])

Our interest is in sdPanelist[ ], which will be examined in the result phase.

A consequence of adding this model part is the need for more precise variable names. There was a variable sdPanelist before, which concerned the standard deviation between panelists’ means. This has been renamed to sdPanel.

## Result

#### Model results

#### Panel results

#### Product results

The added model terms have increased the number of product differences and decreased standard deviations. This is not so strange, the less performing panelists are weighed down. In this respect, it seems the model is performing admirably.

v1 v2

2 1 3

3 2 3

4 1 4

6 3 4

9 3 5

11 1 6

13 3 6

Mean SD Naive SE Time-series SE

choc1 6.987792 0.1833657 0.002899266 0.002886758

choc2 6.597215 0.1796334 0.002840253 0.003067686

choc3 4.842514 0.1975550 0.003123619 0.003345383

choc4 6.363283 0.1787572 0.002826399 0.002985240

choc5 6.665101 0.1833072 0.002898341 0.003356131

choc6 6.486780 0.1795052 0.002838226 0.002685428

## R code

**leave a comment**for the author, please follow the link and comment on their blog:

**Wiekvoet**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...