Different From Control Test (Wilcoxon) Analysis

Different From Control Test (Wilcoxon) Analysis

Purpose 

The Wilcoxon signed rank test is a test for difference in paired data.  It is a non-parametric alternative to the paired sample t-test that should be used when the differences between data pairs are not normally distributed.

Data Format

EyeOpenR requires a data set where all assessors have evaluated 2 or more products on numeric scales.  One of these products is defined as a reference/control product against which each of the other products is tested in turn, in a sequence of Wilcoxon tests.  The data should be supplied in a format similar to the example data file attached at the end of this article.  The raw data table must have columns for judge and product, and one of more attribute columns with numeric data for analysis. 

Background 

The Wilcoxon signed rank test statistic calculated is by taking the differences between paired data then ranking these differences by absolute value and then subtracting the sum of ranks associated to negative differences from those associated to positive differences.  Ties are awarded the average of the ranks they span. The observed test statistic is then compared to Wilcoxon signed rank distribution or a normal approximation of this distribution when there is a large sample size.

The analysis considers a reference product paired with each non-reference product. For each observation xi of a given product there must be a corresponding observation yi of the reference product, any observation that does not meet this criterion will be removed with a warning given. The analysis requires a minimum of n=15 data pairs, after pairs with a difference of zero have been discarded. The Wilcoxon signed rank test statistic for comparing this product to the reference product will then be calculated as:

Where Ri is the rank of |xi – yi| within the set |xj – yj| over all possible values of j.

The null hypothesis is that the differences in the paired data have a symmetric distribution around zero. The two-sided alternative hypothesis is that the null hypothesis is false. An alpha level of 0.05 is used for the test.

In addition to the Wilcoxon test, the median difference and 95% confidence interval for the median are reported. The Hodges-Lehmann estimator is used for the calculation of the estimated median difference. When n<50 and there are no tied differences then an exact method (Bauer 1972) is used to calculate the confidence intervals. Otherwise, a normal approximation giving a confidence interval symmetric about the median is used.

The calculation of the Wilcoxon test and the construction of the median and confidence intervals is performed internally by calling the R function wilcox.test() which is part of the system package called ‘stats’.  Refer to the R documentation for more details.

Options

  1. The standard reference product is chosen by clicking to highlight one of the product names in the list box.
  2. Number of decimals for values: The number of decimals to show for median difference, confidence interval and Wilcoxon Statistics.
  3. Number of decimals for P-values: The number of decimals to show for p-values associated with the Wilcoxon test.
  4. X-axis min value: controls the minimum value of the X-axis of a bar chart used to visualise products differences (default -2).
  5. X-axis max value: controls the maximum value of the X-axis of a bar chart used to visualise products differences (default +2) 

Results and Interpretation

The first results tab is called Diff by Product and has a sub-tab for each non-reference product. A bar chart, see example below, is shown that displays the median difference from reference for each attribute for the selected product.  The attribute bars are colour coded according to the significance of the Wilcoxon test statistic.  The user should look initially for red bars that indicate a p-value less than 0.05.  Orange coloured bars indicate significance at p<0.1, while non-significant attributes are coloured blue.


The median difference is calculated as ‘non-reference – reference’.

The Diff by Product results screen also includes a table with numerical results for each attribute. The first column contains the median differences, the second column the Wilcoxon signed rank statistic, the third and fourth columns contain the confidence interval for the median estimate, and the final column contains the p-values for Wilcoxon test.  The cells of the last column and colour coded in the same way as the bars of the bar-chart.


The second results tab is called Table of Results and shows estimates of the median difference of all non-reference products and attributes together. The cells are colour coded by their associated p-values (blue, red, and orange).



References

  1. David F. Bauer (1972), “Constructing Confidence Sets Using Rank Statistics”, Journal of the American Statistical Association, Volume 67, 687-690.