# regwq: REGWQ - Ryan / Einot and Gabriel / Welsch test procedure... In mutoss: Unified Multiple Testing Procedures

## Description

REGWQ - Ryan / Einot and Gabriel / Welsch test procedure This function computes REGWQ test for given data including p samples. It is based on a stepwise or layer approach to significance testing. Sample means are ordered from the smallest to the largest. The largest difference, which involves means that are r = p steps apart, is tested first at α level of significance; if significant, means that are r <p steps apart are tested at a different α level of significance and so on. Compare to the Student- Newman-Keuls test, the α levels are adjusted for the p-1 different layers by the formula α_p=α, if p=k or p=k-1, α_p = 1-(1-α)^{p/k} otherwise. It might happen that the quantiles are not descending in p. In this case, they are adapted by c_k = max_{2≤q r ≤q k} c_r, k=2,…,p. The REGWQ procedure, like Tukey's procedure, requires equal sample n's. However, in this algorithm, the procedure is adapted to unequal sample sized which can lead to still conservative test decisions.

## Usage

 `1` ```regwq(formula, data, alpha, MSE=NULL, df=NULL, silent=FALSE) ```

## Arguments

 `formula` Formula defining the statistical model containing the response and the factors `data` dataset containing the response and the grouping factor `alpha` The level at which the error should be controlled. By default it is alpha=0.05. `MSE` Optional for a given variance of the data `df` Optional for a given degree of freedom `silent` If true any output on the console will be suppressed.

## Value

A list containing:

 `adjPValues` A numeric vector containing the adjusted pValues `rejected` A logical vector indicating which hypotheses are rejected `statistics` A numeric vector containing the test-statistics `confIntervals` A matrix containing only the estimates `errorControl` A Mutoss S4 class of type `errorControl`, containing the type of error controlled by the function.

## Author(s)

Frank Konietschke

## References

Hochberg, Y. & Tamhane, A. C. (1987). Multiple Comparison Procedures, Wiley.

## Examples

 ```1 2 3 4 5 6 7``` ```x = rnorm(50) grp = c(rep(1:5,10)) dataframe <- data.frame(x,grp) result <- regwq(x~grp, data=dataframe, alpha=0.05,MSE=NULL, df=NULL, silent = TRUE) result <- regwq(x~grp, data=dataframe, alpha=0.05,MSE=NULL, df=NULL, silent = FALSE) result <- regwq(x~grp, data=dataframe, alpha=0.05,MSE=1, df=Inf, silent = FALSE) # known variance result <- regwq(x~grp, data=dataframe, alpha=0.05,MSE=1, df=1000, silent = FALSE) # known variance ```

mutoss documentation built on May 2, 2019, 2:38 a.m.