quade.test {stats} | R Documentation |
Quade Test
Description
Performs a Quade test with unreplicated blocked data.
Usage
quade.test(y, ...)
## Default S3 method:
quade.test(y, groups, blocks, ...)
## S3 method for class 'formula'
quade.test(formula, data, subset, na.action, ...)
Arguments
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. |
Details
quade.test
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
.
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.
Value
A list with class "htest"
containing the following components:
statistic |
the value of Quade's F statistic. |
parameter |
a vector with the numerator and denominator degrees of freedom of the approximate F distribution of the test statistic. |
p.value |
the p-value of the test. |
method |
the character string |
data.name |
a character string giving the names of the data. |
References
Conover WJ (1999).
Practical Nonparametric Statistics, Third edition.
Wiley.
ISBN 978-0471160687.
Pages 373–380.
Quade D (1979). “Using Weighted Rankings in the Analysis of Complete Blocks with Additive Block Effects.” Journal of the American Statistical Association, 74(367), 680–683. doi:10.1080/01621459.1979.10481670.
See Also
Examples
## Conover (1999, p. 375f):
## Numbers of five brands of a new hand lotion sold in seven stores
## during one week.
y <- matrix(c( 5, 4, 7, 10, 12,
1, 3, 1, 0, 2,
16, 12, 22, 22, 35,
5, 4, 3, 5, 4,
10, 9, 7, 13, 10,
19, 18, 28, 37, 58,
10, 7, 6, 8, 7),
nrow = 7, byrow = TRUE,
dimnames =
list(Store = as.character(1:7),
Brand = LETTERS[1:5]))
y
(qTst <- quade.test(y))
## Show equivalence of different versions of test :
utils::str(dy <- as.data.frame(as.table(y)))
qT. <- quade.test(Freq ~ Brand|Store, data = dy)
qT.$data.name <- qTst$data.name
stopifnot(all.equal(qTst, qT., tolerance = 1e-15))
dys <- dy[order(dy[,"Freq"]),]
qTs <- quade.test(Freq ~ Brand|Store, data = dys)
qTs$data.name <- qTst$data.name
stopifnot(all.equal(qTst, qTs, tolerance = 1e-15))