I am trying to find the critical value for the Wilcoxon one-sample signed-rank test. Currently, I can find the value using tables. I looked at qwilcox() in R, but it appears that this gives the critical values for the Wilcoxon two-sample test (or Mann–Whitney test). Is there a function in R which I can use to compute this critical value?


You can use the qsignrank() function. Example:

> qsignrank(.025, 10, lower.tail=FALSE)

This means that for a sample size of 10 and a two-sided test with a significance level of 5%, the test statistic must be greater than 46 (i.e., 47 or greater) to be statistically significant. Example data:

> set.seed(1)
> x = rnorm(10, .5)
> wilcox.test(x)

    Wilcoxon signed rank test

data:  x
V = 47, p-value = 0.04883
alternative hypothesis: true location is not equal to 0

Here the test statistic is 47, and significant at the 5% level.

Note that for a two-sided test, the test statistic returned by qsignrank() is the larger of the two possible test statistics. For example, wilcox.test(-x) gives a test statistic of 8, which can be transformed into 47 by $\frac{10\cdot 11}{2}-8$.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.