Learn R Programming

PMCMRplus (version 1.3.0)

osrtTest: One-Sided Studentised Range Test

Description

Performs Hayter's one-sided studentised range test against an ordered alternative for normal data with equal variances.

Usage

osrtTest(x, ...)

# S3 method for default osrtTest(x, g, ...)

# S3 method for formula osrtTest(formula, data, subset, na.action, ...)

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.

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 NAs. Defaults to getOption("na.action").

Value

A list with class "htest" 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

the estimated quantile of the test statistic.

p.value

the p-value for the test.

parameter

the parameters of the test statistic, if any.

alternative

a character string describing the alternative hypothesis.

estimates

the estimates, if any.

null.value

the estimate under the null hypothesis, if any.

References

Hayter, A. J.(1990) A One-Sided Studentised Range Test for Testing Against a Simple Ordered Alternative, Journal of the American Statistical Association 85, 778--785.

Examples

Run this code
# NOT RUN {
osrtTest(weight ~ group, data = PlantGrowth)
# }

Run the code above in your browser using DataLab