# posthoc.vanWaerden.test: Pairwise Test for Multiple Comparisons of normal scores (van... In PMCMR: Calculate Pairwise Multiple Comparisons of Mean Rank Sums

## Description

Calculate pairwise multiple comparisons between group levels according to van der Waerden.

## Usage

 ```1 2 3 4 5 6 7 8 9``` ```posthoc.vanWaerden.test(x, ...) ## Default S3 method: posthoc.vanWaerden.test( x, g, p.adjust.method = p.adjust.methods, ...) ## S3 method for class 'formula' posthoc.vanWaerden.test(formula, data, subset, na.action, p.adjust.method = p.adjust.methods, ...) ```

## Arguments

 `x` a numeric vector of data values, or a list of numeric data vectors. `g` a vector or factor object giving the group for the corresponding elements of `x`. Ignored if `x` is a list. `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")`. `p.adjust.method` Method for adjusting p values (see `p.adjust`). `...` further arguments to be passed to or from methods.

## Details

For one-factorial designs with samples that do not meet the assumptions for one-way-ANOVA and subsequent post-hoc tests, the van der Waerden test `vanWaerden.test` using normal scores can be employed. Provided that significant differences were detected by this global test, one may be interested in applying post-hoc tests according to van der Waerden for pairwise multiple comparisons of the group levels.

First, the data are ranked according to Kruskal-Wallis. Second, the ranks are transformed to normal scores. The group means of normal scores and the total variance is used to calculate quantiles of the student-t-distribution and consequent p-values.

See `vignette("PMCMR")` for details.

## Value

A list with class `"PMCMR"`

 `method ` The applied method. `data.name` The name of the data. `p.value` The two-sided p-value of the student-t-distribution. `statistic` The estimated quantile of the student-t-distribution. `p.adjust.method` The applied method for p-value adjustment.

## Note

There is no tie correction applied in this function.

Thorsten Pohlert

## References

W. J. Conover and R. L. Iman (1979), On multiple-comparisons procedures, Tech. Rep. LA-7677-MS, Los Alamos Scientific Laboratory.

`kruskal.test`, `vanWaerden.test`, `posthoc.kruskal.nemenyi.test`, `posthoc.kruskal.dunn.test`, `TDist`, `p.adjust`

## Examples

 ```1 2 3 4 5 6 7 8``` ```## require(stats) data(InsectSprays) attach(InsectSprays) vanWaerden.test(count, spray) posthoc.vanWaerden.test(count, spray, "bonferroni") detach(InsectSprays) rm(InsectSprays) ```

### Example output

```	Van der Waerden normal scores test

data:  count and spray
Van der Waerden chi-squared = 50.302, df = 5, p-value = 1.202e-09

Pairwise comparisons using van der Waerden normal scores test for
multiple comparisons of independent samples

data:  count and spray

A       B       C       D       E
B 1.00000 -       -       -       -
C 1.0e-10 1.5e-11 -       -       -
D 0.00014 2.3e-05 0.01201 -       -
E 8.2e-07 1.2e-07 0.47383 1.00000 -
F 1.00000 1.00000 7.5e-13 1.3e-06 6.1e-09