Performs Nashimoto and Wright's all-pairs comparison procedure
for simply ordered mean ranksums (NPY' test and NPT' test).
According to the authors, bove procedures shall only be
applied after Chacko's test (see chackoTest
indicates
global significance.
The modified procedure uses the property of a simple order, \(\theta_m' - \theta_m \le \theta_j - \theta_i \le \theta_l' - \theta_l \qquad (l \le i \le m~\mathrm{and}~ m' \le j \le l')\). The null hypothesis H\(_{ij}: \theta_i = \theta_j\) is tested against the alternative A\(_{ij}: \theta_i < \theta_j\) for any \(1 \le i < j \le k\).
In the NPY' test the p-values are estimated from the studentized range distribution. In the NPT' test the p-values are estimated from the standard normal distribution.
chaAllPairsNashimotoTest(x, ...)# S3 method for default
chaAllPairsNashimotoTest(x, g,
p.adjust.method = c("single-step", p.adjust.methods), ...)
# S3 method for formula
chaAllPairsNashimotoTest(formula, data, subset, na.action,
p.adjust.method = c("single-step", p.adjust.methods), ...)
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.
method for adjusting p values
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 type of test can be controlled via the argument p.adjust.method
:
the NPY' test is performed.
the plain NPT' test is performed.
However, any method as available by p.adjust.methods
can
be selected for the adjustment of p-values estimated from
the standard normal distribution.
Nashimoto, K., Wright, F.T., (2005), Multiple comparison procedures for detecting differences in simply ordered means. Comput. Statist. Data Anal. 48, 291--306.
# 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("A", "B", "C")
chackoTest(x , g)
chaAllPairsNashimotoTest(x, g, p.adjust.method = "single-step")
# }
Run the code above in your browser using DataLab