Performs Shirley's nonparametric equivalent of William's test for contrasting increasing dose levels of a treatment.
shirleyWilliamsTest(x, ...)# S3 method for default
shirleyWilliamsTest(x, g, nperm = 1000, ...)
# S3 method for formula
shirleyWilliamsTest(formula, data, subset, na.action,
nperm = 1000, ...)
a numeric vector of data values, or a list of numeric data vectors.
further arguments to be passed to or from methods.
a vector or factor object giving the group for the
corresponding elements of "x"
.
Ignored with a warning if "x"
is a list.
number of permutations for the assymptotic permutation test.
Defaults to 1000
.
a formula of the form response ~ group
where
response
gives the data values and group
a vector or
factor of the corresponding groups.
an optional matrix or data frame (or similar: see
model.frame
) containing the variables in the
formula formula
. By default the variables are taken from
environment(formula)
.
an optional vector specifying a subset of observations to be used.
a function which indicates what should happen when
the data contain NA
s. Defaults to getOption("na.action")
.
A list with class "PMCMR"
containing the following components:
a character string indicating what type of test was performed.
a character string giving the name(s) of the data.
lower-triangle matrix of the estimated quantiles of the pairwise test statistics.
lower-triangle matrix of the p-values for the pairwise tests.
a character string describing the alternative hypothesis.
a character string describing the method for p-value adjustment.
a data frame of the input data.
a string that denotes the test distribution.
The Shirley-William test is a non-parametric step-down trend test for testing several treatment levels
with a zero control. Let there be m = k - 1
hypotheses are tested:
The procedure starts from the highest dose level (
The p-values are estimated through an assymptotic boot-strap method. The p-values for H
Shirley, E., (1977), Nonparametric Equivalent of Williams Test for Contrasting Increasing Dose Levels of a Treatment. Biometrics, 33, 386--389.
Williams, D.A. (1986), Note on Shirley's nonparametric test for comparing several dose levels with a zero-dose control. Biometrics 42, 183--186.
# NOT RUN {
## Example from Sachs (1997, p. 402)
x <- c(106, 114, 116, 127, 145,
110, 125, 143, 148, 151,
136, 139, 149, 160, 174)
g <- gl(3,5)
levels(g) <- c("0", "I", "II")
## Shirley-Williams Test
shirleyWilliamsTest(x ~ g)
# }
Run the code above in your browser using DataLab