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 X0j denote a variable with the j-th realization of the control group (1≤j≤n0) and Xij the j-the realization in the i-th treatment group (1≤i≤k). The variables are i.i.d. of a least ordinal scale with F(x)=F(x0)=F(xi),(1≤i≤k). A total of m=k hypotheses can be tested:
The test statistic Ti∗ is asymptotically standard normal
Ti∗=σ2(Ti)Ti−μ(Ti),(1≤i≤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 leveldf <- 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:5ans <- 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")