comp.norm.test: Selection of Nonnormal Invariant Components Using Marginal...

View source: R/comp.norm.test.R

comp.norm.testR Documentation

Selection of Nonnormal Invariant Components Using Marginal Normality Tests

Description

Identifies invariant coordinates that are non normal using univariate normality tests.

Usage

comp.norm.test(object, test = "agostino.test", type = "smallprop", level = 0.05, 
  adjust = TRUE)

Arguments

object

object of class ics2 where both S1 and S2 are specified as functions. The sample size and the dimension of interest are also obtained from the object.

test

name of the normality test to be used. Possibilites are "jarque.test", "anscombe.test", "bonett.test", "agostino.test", "shapiro.test". Default is "agostino.test".

type

currently the only option is "smallprop". See details.

level

the initial level used to make a decision based on the test p-values. See details.

adjust

logical. If TRUE, the quantiles levels are adjusted. Default is TRUE. See details.

Details

Currently the only available type is "smallprop" which detects which of the components follow a univariately normal distribution. It starts from the first component and stops when a component is detected as gaussian. Five tests for univariate normality are available.

If adjust = FALSE all tests are performed at the same level. This leads however often to too many components. Therefore some multiple testing adjustments might be useful. The current default adjusts the level for the jth component as level/j.

Note that the function is seldomly called directly by the user but internally by ics.outlier.

Value

A list containing:

index

integer vector indicating the indices of the selected components.

test

string with the name of the normality test used.

criterion

vector of the p-values from the marginal normality tests for each component.

levels

vector of the levels used for the decision for each component.

adjust

logical. TRUE if adjusted.

type

type used.

Author(s)

Aurore Archimbaud and Klaus Nordhausen

References

Archimbaud, A., Nordhausen, K. and Ruiz-Gazen, A. (2018), ICS for multivariate outlier detection with application to quality control. Computational Statistics & Data Analysis, 128:184-199. ISSN 0167-9473. <https://doi.org/10.1016/j.csda.2018.06.011>.

See Also

ics2, comp.simu.test, jarque.test, anscombe.test, bonett.test, agostino.test, shapiro.test

Examples

Z <- rmvnorm(1000, rep(0, 6))
# Add 20 outliers on the first component
Z[1:20, 1] <- Z[1:20, 1] + 10
pairs(Z)
icsZ <- ics2(Z)
# The shift located outliers can be displayed in one dimension
comp.norm.test(icsZ)
# Only one invariant component is non normal and selected.
comp.norm.test(icsZ, test = "bo")

# Example with no outlier
Z0 <- rmvnorm(1000, rep(0, 6))
pairs(Z0)
icsZ0 <- ics2(Z0)
# Should select no component
comp.norm.test(icsZ0, level = 0.01)$index


ICSOutlier documentation built on Sept. 18, 2023, 5:07 p.m.