Description Usage Arguments Details Value Author(s) References See Also Examples
A extension of the well-known rank-based test, but allowing for correlations between cases.
1 | rankSumTestWithCorrelation(index, statistics, correlation=0, df=Inf)
|
index |
any index vector such that |
statistics |
numeric vector giving values of the test statistic. |
correlation |
numeric scalar, average correlation between cases in the test group. Cases in the second group are assumed independent of each other and other the first group. |
df |
degrees of freedom which the correlation has been estimated. |
This function implements a correlation-adjusted version of the Wilcoxon-Mann-Whitney test proposed by Wu and Smyth (2012). It tests whether the mean rank of statistics in the test group is greater or less than the mean rank of the remaining statistic values.
When the correlation (or variance inflation factor) is zero, the function performs the usual two-sample Wilcoxon-Mann-Whitney rank sum test. The Wilcoxon-Mann-Whitney test is implemented following the formulas given in Zar (1999) Section 8.10, including corrections for ties and for continuity.
The test allows for the possibility that cases in the test group may be more highly correlated on average than cases not in the group. When the correlation is non-zero, the variance of the rank-sum statistic is computing using a formula derived from equation (4.5) of Barry et al (2008). When the correlation is positive, the variance is increased and test will become more conservative.
Numeric vector containing left.tail
and right.tail
p-values respectively.
Gordon Smyth and Di Wu
Barry, W.T., Nobel, A.B., and Wright, F.A. (2008). A statistical framework for testing functional categories in microarray data. Annals of Applied Statistics 2, 286-315.
Wu, D, and Smyth, GK (2012). Camera: a competitive gene set test accounting for inter-gene correlation. Nucleic Acids Research. (Accepted 1 May 2012)
Zar, JH (1999). Biostatistical Analysis 4th Edition. Prentice-Hall International, Upper Saddle River, New Jersey.
wilcox.test
performs the usual Wilcoxon-Mann-Whitney test assuming independence.
An overview of tests in limma is given in 08.Tests.
1 2 3 4 5 6 7 8 9 10 11 | stat <- rnorm(100)
index <- 1:10
stat[index] <- stat[1:10]+1
rankSumTestWithCorrelation(index, stat)
rankSumTestWithCorrelation(index, stat, correlation=0.1)
group <- rep(1,100)
group[index] <- 2
group <- factor(group)
wilcox.test(stat ~ group)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.