chenTest function

Chen's Many-to-One Comparisons Test

Chen's Many-to-One Comparisons Test

Performs Chen's nonparametric test for contrasting increasing (decreasing) dose levels of a treatment.

chenTest(x, ...) ## Default S3 method: chenTest( x, g, alternative = c("greater", "less"), p.adjust.method = c("SD1", p.adjust.methods), ... ) ## S3 method for class 'formula' chenTest( formula, data, subset, na.action, alternative = c("greater", "less"), p.adjust.method = c("SD1", p.adjust.methods), ... )

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.
  • alternative: the alternative hypothesis. Defaults to two.sided.
  • p.adjust.method: method for adjusting p values (see p.adjust)
  • 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").

Returns

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

Chen's test is a non-parametric step-down trend test for testing several treatment levels with a zero control. Let X0jX_{0j} denote a variable with the jj-th realization of the control group (1jn01 \le j \le n_0) and XijX_{ij} the jj-the realization in the ii-th treatment group (1ik1 \le i \le k). The variables are i.i.d. of a least ordinal scale with F(x)=F(x0)=F(xi), (1ik)F(x) = F(x_0) = F(x_i), ~ (1 \le i \le k). A total of m=km = k hypotheses can be tested:

Hm:θ0=θ1==θm,Am=θ0θ1θm,θ0<θmHm1:θ0=θ1==θm1,Am1=θ0θ1θm1,θ0<θm1H1:θ0=θ1,A1=θ0<θ1 \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 TiT_i are based on a Wilcoxon-type ranking:

Ti=j=0i=1u=1niv=1njI(xiuxjv),(1ik), 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, if a>0,0.5 ifa=0I(a) = 1, ~ \mathrm{if}~ a > 0, 0.5 ~ \mathrm{if} a = 0

otherwise 00.

The expected iith mean is

μ(Ti)=niNi1/2, \mu(T_i) = n_i N_{i-1} / 2,

with Nj=j=0injN_j = \sum_{j =0}^i n_j and the iith variance:

σ2(Ti)=niNi1/12 {Ni+1j=1gtj(tj21)/[Ni(Ni1)]}. \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 TiT_i^* is asymptotically standard normal

Ti=Tiμ(Ti)σ2(Ti),(1ik). 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".

Note

Factor labels for g must be assigned in such a way, that they can be increasingly ordered from zero-dose control to the highest dose level, e.g. integers {0, 1, 2, ..., k} or letters {a, b, c, ...}. Otherwise the function may not select the correct values for intended zero-dose control.

It is safer, to i) label the factor levels as given above, and to ii) sort the data according to increasing dose-levels prior to call the function (see order, factor).

Examples

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

References

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

See Also

wilcox.test, Normal

  • Maintainer: Thorsten Pohlert
  • License: GPL (>= 3)
  • Last published: 2024-09-08

Useful links