N replications of
k different treatments/conditions,
tests whether the median ordinal ranks m_i of the treatments
m_1 = m_2 = … = m_k
against the alternative hypothesis
m_1 ≤q m_2 ≤q … ≤q m_k
where at least one of the inequalities is a strict inequality (Siegel and Castellan 1988, p.184). Given that even a single point change in the distribution of ranks across conditions represents evidence against the null hypothesis, the Page test is simply a test for some ordered differences in ranks, but not a 'trend test' in any meaningful way (see also the Page test tutorial).
1 2 3 4 5
a matrix with the different conditions along its
whether to print the final rankings based on which the L statistic is computed
how to resolve tied ranks. Passed on to
number of conditions/generations
number of replications/chains
value of the Page L statistic
Tests the given matrix for monotonically increasing ranks across
linearly ordered conditions (along columns) based on
(along rows). To test for monotonically decreasing ranks, either reverse
the order of columns, or simply invert the rank ordering by calling
the entire dataset.
Exact p-values are computed for
k up to 22, using the pre-computed null
distributions from the
pspearman package. For
k, p-values are computed based on a Normal distribution
approximation (Siegel and Castellan, 1988).
page.test returns a list of class
htest) containing the following elements:
value of the L statistic for the data set
a named vector specifying the number of conditions (k) and replications (N) of the data (which is the number of columns and rows of the data set, respectively)
whether the computed p-value is
page.test: See above.
page.L: Calculate Page's L statistic for the given dataset.
page.compute.exact: Calculate exact significance levels of the Page L
statistic. Returns a single numeric indicating the null probability of
the Page statistic with the given
N being greater or equal than the
Siegel, S., and N. J. Castellan, Jr. (1988). Nonparametric Statistics for the Behavioral Sciences. McGraw-Hill.
1 2 3 4 5 6 7 8 9 10 11 12 13
# exact p value computation for N=4, k=4 page.test(t(replicate(4, sample(4)))) # exact p value computation for N=4, k=10 page.test(t(replicate(4, sample(10)))) # approximate p value computation for N=4, k=23 result <- page.test(t(replicate(4, sample(23))), verbose = FALSE) print(result) # raw calculation of the significance levels page.compute.exact(6, 4, 322)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.