chaAllPairsNashimotoTest {PMCMRplus} | R Documentation

## All-Pairs Comparisons for Simply Ordered Mean Ranksums

### Description

Performs Nashimoto and Wright's all-pairs comparison procedure for simply ordered mean ranksums (NPY-test). According to the authors, the procedure shall only be applied after Chacko's test (see `chackoTest`) indicates global significance.

The modified procedure uses the property of a simple order, θ_m' - θ_m ≤ θ_j - θ_i ≤ θ_l' - θ_l \qquad (l ≤ i ≤ m~\mathrm{and}~ m' ≤ j ≤ l'). The null hypothesis H_{ij}: θ_i = θ_j is tested against the alternative A_{ij}: θ_i < θ_j for any 1 ≤ i < j ≤ k.

In the NPT test the p-values are estimated from the standard normal distribution.

### Usage

    chaAllPairsNashimotoTest(x, ...)

    ## Default S3 method:
    chaAllPairsNashimotoTest(x, g, p.adjust.method = c(p.adjust.methods), ...)

    ## S3 method for class 'formula'
    chaAllPairsNashimotoTest(
      formula,
      data,
      subset,
      na.action,
      p.adjust.method = c(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.
`p.adjust.method` | method for adjusting p values
`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 `NA`s. Defaults to `getOption("na.action")`.

### Details

Although Nashimoto and Wright (2005) originally did not use any p-adjustment, any method as available by `p.adjust.methods` can be selected for the adjustment of p-values estimated from the standard normal distribution.

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

### References

Nashimoto, K., Wright, F.T. (2007) Nonparametric Multiple-Comparison Methods for Simply Ordered Medians. Comput Stat Data Anal 51, 5068–5076.

### See Also

`Normal`, `chackoTest`

### Examples

    ## 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 = "none")

[Package PMCMRplus version 1.6.1 Index]