# NOT RUN {
# 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)
# }
Run the code above in your browser using DataLab