Description Usage Arguments Details Value Note Author(s) References See Also Examples
Performs a Page test for ordered alternatives using an exact algorithm by Stefan Wellek (1989) with unreplicated blocked data.
1 2 3 4 5 6 7 
y 
either a numeric vector of data values, or a data matrix. 
groups 
a vector giving the group for the corresponding
elements of 
blocks 
a vector giving the block for the corresponding
elements of 
formula 
a formula of the form 
data 
an optional matrix or data frame (or similar: see

subset 
an optional vector specifying a subset of observations to be used. 
na.action 
a function which indicates what should happen when
the data contain 
... 
further arguments to be passed to or from methods. 
PageTest
can be used for analyzing unreplicated complete
block designs (i.e., there is exactly one observation in y
for each combination of levels of groups
and blocks
)
where the normality assumption may be violated.
The null hypothesis is that apart from an effect of blocks
,
the location parameter of y
is the same in each of the
groups
.
The implemented alternative is, that the location parameter will be monotonly greater along the groups,
H_{A}: θ_{1} ≤ θ_{2} ≤ θ_{3} ... (where at least one inequality is strict).
If the other direction is required, the order of the groups has to be reversed.
The Page test for ordered alternatives is slightly more powerful than
the Friedman analysis of variance by ranks.
If y
is a matrix, groups
and blocks
are
obtained from the column and row indices, respectively. NA
's
are not allowed in groups
or blocks
; if y
contains NA
's, corresponding blocks are removed.
For small values of k (methods) or N (data objects), PageTest will calculate the exact pvalues. For k, N > 15, Inf, a normal approximation is returned. Only one of these values will be returned.
A list with class "htest"
containing the following components:
statistic 
the Lstatistic with names attribute “L”. 
p.value 
the pvalue of the test. 
method 
the character string 
data.name 
a character string giving the names of the data. 
Special thanks to Prof. S. Wellek for porting old GAUSS code to R.
Stefan Wellek <[email protected]> (exact pvalues), Andri Signorell <[email protected]> (interface) (strongly based on RCore code)
Page, E. (1963): Ordered hypotheses for multiple treatments: A significance test for linear ranks. Journal of the American Statistical Association, 58, 216230.
Siegel, S. & Castellan, N. J. Jr. (1988): Nonparametric statistics for the behavioral sciences. Boston, MA: McGrawHill.
Wellek, S. (1989): Computing exact pvalues in Page's nonparametric test against trend. Biometrie und Informatik in Medizin und Biologie 20, 163170
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63  # Craig's data from Siegel & Castellan, p 186
soa.mat < matrix(c(.797,.873,.888,.923,.942,.956,
.794,.772,.908,.982,.946,.913,
.838,.801,.853,.951,.883,.837,
.815,.801,.747,.859,.887,.902), nrow=4, byrow=TRUE)
PageTest(soa.mat)
# Duller, pg. 236
pers < matrix(c(
1, 72, 72, 71.5, 69, 70, 69.5, 68, 68, 67, 68,
2, 83, 81, 81, 82, 82.5, 81, 79, 80.5, 80, 81,
3, 95, 92, 91.5, 89, 89, 90.5, 89, 89, 88, 88,
4, 71, 72, 71, 70.5, 70, 71, 71, 70, 69.5, 69,
5, 79, 79, 78.5, 77, 77.5, 78, 77.5, 76, 76.5, 76,
6, 80, 78.5, 78, 77, 77.5, 77, 76, 76, 75.5, 75.5
), nrow=6, byrow=TRUE)
colnames(pers) < c("person", paste("week",1:10))
# Alternative: week10 < week9 < week8 ...
PageTest(pers[, 11:2])
# Sachs, pg. 464
pers < matrix(c(
3,2,1,4,
4,2,3,1,
4,1,2,3,
4,2,3,1,
3,2,1,4,
4,1,2,3,
4,3,2,1,
3,1,2,4,
3,1,4,2),
nrow=9, byrow=TRUE, dimnames=list(1:9, LETTERS[1:4]))
# Alternative: B < C < D < A
PageTest(pers[, c("B","C","D","A")])
# long shape and formula interface
plng < data.frame(expand.grid(1:9, c("B","C","D","A")),
as.vector(pers[, c("B","C","D","A")]))
colnames(plng) < c("block","group","x")
PageTest(plng$x, plng$group, plng$block)
PageTest(x ~ group  block, data = plng)
score < matrix(c(
3,4,6,9,
4,3,7,8,
3,4,4,6,
5,6,8,9,
4,4,9,9,
6,7,11,10
), nrow=6, byrow=TRUE)
PageTest(score)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.