Learn R Programming

PMCMRplus (version 1.1.0)

shirleyWilliamsTest: Shirley-Williams Test

Description

Performs Shirley's nonparametric equivalent of William's test for contrasting increasing dose levels of a treatment.

Usage

shirleyWilliamsTest(x, ...)

# S3 method for default shirleyWilliamsTest(x, g, nperm = 1000, ...)

# S3 method for formula shirleyWilliamsTest(formula, data, subset, na.action, nperm = 1000, ...)

Arguments

x

a numeric vector of data values, or a list of numeric data vectors.

further arguments to be passed to or from methods.

g

a vector or factor object giving the group for the corresponding elements of "x". Ignored with a warning if "x" is a list.

nperm

number of permutations for the assymptotic permutation test. Defaults to 1000.

formula

a formula of the form response ~ group where response gives the data values and group a vector or factor of the corresponding groups.

data

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).

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 NAs. Defaults to getOption("na.action").

Value

A list with class "PMCMR" containing the following components:

method

a character string indicating what type of test was performed.

data.name

a character string giving the name(s) of the data.

statistic

lower-triangle matrix of the estimated quantiles of the pairwise test statistics.

p.value

lower-triangle matrix of the p-values for the pairwise tests.

alternative

a character string describing the alternative hypothesis.

p.adjust.method

a character string describing the method for p-value adjustment.

model

a data frame of the input data.

dist

a string that denotes the test distribution.

Details

The Shirley-William test is a non-parametric step-down trend test for testing several treatment levels with a zero control. Let there be \(k\) groups including the control and let the zero dose level be indicated with \(i = 0\) and the highest dose level with \(i = m\), then the following m = k - 1 hypotheses are tested:

$$ \begin{array}{ll} \mathrm{H}_{m}: \theta_0 = \theta_1 = \ldots = \theta_m, & \mathrm{A}_{m} = \theta_0 \le \theta_1 \le \ldots \theta_m, \theta_0 < \theta_m \\ \mathrm{H}_{m-1}: \theta_0 = \theta_1 = \ldots = \theta_{m-1}, & \mathrm{A}_{m-1} = \theta_0 \le \theta_1 \le \ldots \theta_{m-1}, \theta_0 < \theta_{m-1} \\ \vdots & \vdots \\ \mathrm{H}_{1}: \theta_0 = \theta_1, & \mathrm{A}_{1} = \theta_0 < \theta_1\\ \end{array} $$

The procedure starts from the highest dose level (\(m\)) to the the lowest dose level (\(1\)) and stops at the first non-significant test. The consequent lowest effect dose is the treatment level of the previous test number.

The p-values are estimated through an assymptotic boot-strap method. The p-values for H\(_1\) are calculated from the t distribution with infinite degree of freedom. This function has included the modifications as recommended by Williams (1986).

References

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.

See Also

sample

Examples

Run this code
# 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