Performs Chen's nonparametric test for contrasting increasing (decreasing) dose levels of a treatment.
chenTest(x, ...)# S3 method for default
chenTest(
x,
g,
alternative = c("greater", "less"),
p.adjust.method = c("SD1", p.adjust.methods),
...
)
# S3 method for formula
chenTest(
formula,
data,
subset,
na.action,
alternative = c("greater", "less"),
p.adjust.method = c("SD1", p.adjust.methods),
...
)
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.
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.
the alternative hypothesis. Defaults to two.sided
.
method for adjusting p values
(see p.adjust
)
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")
.
Chen's test is a non-parametric step-down trend test for testing several treatment levels with a zero control. Let \(X_{0j}\) denote a variable with the \(j\)-th realization of the control group (\(1 \le j \le n_0\)) and \(X_{ij}\) the \(j\)-the realization in the \(i\)-th treatment group (\(1 \le i \le k\)). The variables are i.i.d. of a least ordinal scale with \(F(x) = F(x_0) = F(x_i), ~ (1 \le i \le k)\). A total of \(m = k\) hypotheses can be 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 statistics \(T_i\) are based on a Wilcoxon-type ranking:
$$ T_i = \sum_{j=0}^{i=1} \sum_{u=1}^{n_i} \sum_{v=1}^{n_j} I(x_{iu} - x_{jv}), \qquad (1 \leq i \leq k), $$
where the indicator function returns \(I(a) = 1, ~ \mathrm{if}~ a > 0, 0.5 ~ \mathrm{if} a = 0\) otherwise \(0\).
The expected \(i\)th mean is $$ \mu(T_i) = n_i N_{i-1} / 2, $$
with \(N_j = \sum_{j =0}^i n_j\) and the \(i\)th variance:
$$ \sigma^2(T_i) = n_i N_{i-1} / 12 ~ \left\{N_i + 1 - \sum_{j=1}^g t_j \left(t_j^2 - 1 \right) / \left[N_i \left( N_i - 1 \right)\right]\right\}. $$
The test statistic \(T_i^*\) is asymptotically standard normal
$$ T_i^* = \frac{T_i - \mu(T_i)} {\sqrt{\sigma^2(T_i)}}, \qquad (1 \leq i \leq k). $$
The p-values are calculated from the standard normal distribution.
The p-values can be adjusted with any method as available
by p.adjust
or by the step-down procedure as proposed
by Chen (1999), if p.adjust.method = "SD1"
.
Chen, Y.-I., 1999, Nonparametric Identification of the Minimum Effective Dose. Biometrics 55, 1236--1240. tools:::Rd_expr_doi("10.1111/j.0006-341X.1999.01236.x")
## Chen, 1999, p. 1237,
## Minimum effective dose (MED)
## is at 2nd dose level
df <- data.frame(x = c(23, 22, 14,
27, 23, 21,
28, 37, 35,
41, 37, 43,
28, 21, 30,
16, 19, 13),
g = gl(6, 3))
levels(df$g) <- 0:5
ans <- chenTest(x ~ g, data = df, alternative = "greater",
p.adjust.method = "SD1")
summary(ans)
Run the code above in your browser using DataLab