The biological data is listed as following:

   V1    V2    V3    V4    V5    V6
0.064 0.014 0.016 0.012 0.013 0.023
0.056 0.000 0.000 0.008 0.010 0.000
0.042 0.014 0.024 0.008 0.017 0.023
0.031 0.014 0.016 0.008 0.013 0.023
0.068 0.000 0.008 0.004 0.020 0.000
0.081 0.000 0.000 0.004 0.010 0.000
0.060 0.014 0.016 0.006 0.010 0.023

or you can download the data from http://www.mediafire.com/?6yp9l9m47jv433a.

A<- dat[,1] 
B<- dat[,2:6]

I want to compare the difference between the first column to other columns of the data.Because only dat[,2] and dat[,6] not subject to normal distribute,I used wilcox.test instead of t.test function to caculate in R. But the warning messages rised up,such as "In wilcox.test.default(A, B[, 1]) : cannot compute exact p-value with ties". Could you give me some suggestions? Thank you.


Wilcoxon rank sum test with continuity correction

data: A and B[, 1] W = 49, p-value = 0.00184 alternative hypothesis: true location shift is not equal to 0

Warning message: In wilcox.test.default(A, B[, 1]) : cannot compute exact p-value with ties
  • $\begingroup$ Could you explain how data were collected and what they intend to measure? Are the different columns of your data matrix independent measurements? $\endgroup$
    – chl
    Sep 19, 2010 at 14:23
  • $\begingroup$ Thank you. These are biological data and each column are indepent data under the same measure method. I only want to know the difference between the first column band each one of others. $\endgroup$
    – Chuangye
    Sep 19, 2010 at 15:52
  • $\begingroup$ When you say you "want to compare the difference between the first column [and the] other columns" are you implying that row 1 represents 6 different measurements on the same object, subject, unit (whatever), row 2 likewise, etc? So we have only 6 things being measured. Or are we looking at 36 different units being measured? And you have not explained why you want to "compare the difference...". What are you trying to test? $\endgroup$
    – Thylacoleo
    Sep 20, 2010 at 6:35
  • $\begingroup$ Thank you,Thylacoleo.These are DNA divergence data of six different groups.I want to know the difference between the first column band each one of others with P value. $\endgroup$
    – Chuangye
    Sep 23, 2010 at 15:00

3 Answers 3


Sometimes a formal statistical test is overkill. Row by row, the entries in the first column are the largest. Draw a picture to make this apparent: side-by-side boxplots or dotplots would work nicely.

Although this is a post-hoc comparison, if the initial intent had been to compare the first column against the rest for a shift in distribution, the most extreme characterizations would be that either all maxima or all minima occur in the first column (a two-sided test). The chance of this occurring by chance, if all columns contained values drawn at random from a common distribution, would be $2 (\frac{1}{6})^7$ = about 0.0007%.

In fact, the first two contains the largest 7 of the 42 values. Again, ex post facto, the chance of such an extreme ordering occurring equals $\frac{2}{42 \choose 7}$ = about 0.000007%.

These results indicate that any reasonably powerful test you choose to conduct will conclude there's a highly significant difference.

In any event, You don't need a p-value; you need to characterize how large the difference is (the right way to do this depends on what the data mean) and you need to seek an explanation for the difference.

  • $\begingroup$ Nice remark! Apart from looking for a plausible interpretation of the data, do you think the use of an exact permutation test is not an option there? $\endgroup$
    – chl
    Sep 19, 2010 at 18:22
  • 2
    $\begingroup$ @chl: I think an exact permutation test would work fine; I implicitly applied two of them in my response. The reason why it should work is that the actual test statistic itself will not be affected by ties, because none of the data in the first column is tied within anything, so that their ranks are all uniquely determined. For the same reason, a Wilcoxon test that does not adjust for ties should give correct results! $\endgroup$
    – whuber
    Sep 19, 2010 at 18:40

For most of your variables (e.g. V2), some observations have identical values, hence the warning message thrown by R: unique ranks cannot be computed for all observations, and there are ties, precluding the computation of an exact p-value. For your variable named V2, there are in fact only two distinct values (out of 7), so I am very puzzled by the approach you took to analysis your data. With such a high number of tied data, I would not trust any Wilcoxon test. Moreover, in most non-parametric tests we assume that the sampled populations are symmetric and have the same dispersion or shape, which is hardly verifiable in your case.

Thus, I think a permutation test would be more appropriate in your case, see e.g. permTS (perm), pperm (exactRankTests), or the coin package.


Thank you very much, chl, whuber and Gaetan Lion. But do you think is there any problem that if I change to caculate the differene among the data using Kruskal-Wallis test instead of comparing the difference between the first column with other columns?


    Kruskal-Wallis rank sum test

data: as.list(Data) Kruskal-Wallis chi-squared = 19.9149, df = 5, p-value = 0.001297


    Kruskal-Wallis rank sum test

data: as.list(Data[, 2:6]) Kruskal-Wallis chi-squared = 3.8242, df = 4, p-value = 0.4303

The result also shows the 1st column has great difference between the other columns. Is it that right?

  • 1
    $\begingroup$ At this point you need to consider how the data were generated and you need to more formally specify your study objectives. The Kruskal-Wallis test, as I recall, looks for a shift of location but assumes homogeneous variances, which obviously is not the case here (compare V4 to V6). The data-generation process may suggest useful analyses (e.g., these data might be rescaled counts or they could be autocorrelated or the low values might represent measurement noise only). $\endgroup$
    – whuber
    Sep 20, 2010 at 14:38
  • $\begingroup$ Whuber,but I foud "The Kruskal-Wallis test does not assume population normality nor homogeneity of variance, as does the parametric ANOVA, and only requires ordinal scaling of the dependent variable." that you can see from jstor.org/pss/1165320 or oak.ucc.nau.edu/rh232/courses/EPS525/Handouts/…. $\endgroup$
    – Chuangye
    Sep 22, 2010 at 14:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.