Learn R Programming

mutoss (version 0.1-9)

regwq: REGWQ - Ryan / Einot and Gabriel / Welsch test procedure...

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 $\alpha$ level of significance; if significant, means that are $r

Usage

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:
  • adjPValuesA numeric vector containing the adjusted pValues
  • rejectedA logical vector indicating which hypotheses are rejected
  • statisticsA numeric vector containing the test-statistics
  • confIntervalsA matrix containing only the estimates
  • errorControlA Mutoss S4 class of type errorControl, containing the type of error controlled by the function.

References

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

Examples

Run this code
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}

Run the code above in your browser using DataLab