chisq.out.test {outliers}R Documentation

Chi-squared test for outlier

Description

Performs a chisquared test for detection of one outlier in a vector.

Usage

chisq.out.test(x, opposite = FALSE)

Arguments

x a numeric vector for data values.
opposite a logical indicating whether you want to check not the value with largest difference from the mean, but opposite (lowest, if most suspicious is highest etc.)

Details

This function performs a simple test for one outlier, based on chisquared distribution of squared differences between data and sample mean. It is not recommended today for routine use, because several more powerful tests are implemented (see other functions mentioned below). It was discussed by Dixon (1950) for the first time, as one of the tests taken into account.

Value

A list with class htest containing the following components:

statistic the value of chisquared-statistic.
p.value the p-value for the test.
alternative a character string describing the alternative hypothesis.
method a character string indicating what type of test was performed.
data.name name of the data argument.

Note

This test is known to reject only extreme outliers.

Author(s)

Lukasz Komsta

References

Dixon, W.J. (1950). Analysis of extreme values. Ann. Math. Stat. 21, 4, 488-506.

See Also

dixon.test, grubbs.test

Examples


set.seed(1234)
x = rnorm(10)
chisq.out.test(x)
chisq.out.test(x,opposite=TRUE)


[Package outliers version 0.1-1 Index]