mandelhTest: Mandel's h Test According to E 691 ASTM

View source: R/mandelhTest.R

mandelhTestR Documentation

Mandel's h Test According to E 691 ASTM

Description

The function calculates the consistency statistics h and corresponding p-values for each group (lab) according to Practice E 691 ASTM.

Usage

mandelhTest(x, ...)

## Default S3 method:
mandelhTest(x, g, ...)

## S3 method for class 'formula'
mandelhTest(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 "mandel" 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.

p.value

the p-value for the test.

statistic

the estimated quantiles of Mandel's statistic.

alternative

a character string describing the alternative hypothesis.

grouplev

a character vector describing the levels of the groups.

nrofrepl

the number of replicates for each group.

References

Practice E 691 (2005) Standard Practice for Conducting an Interlaboratory Study to Determine the Precision of a Test Method, ASTM International.

See Also

qmandelh pmandelh

Examples

data(Pentosan)
mandelhTest(value ~ lab, data=Pentosan, subset=(material == "A"))

PMCMRplus documentation built on May 29, 2024, 8:34 a.m.