Learn R Programming

alphaOutlier (version 1.2.0)

aout.cg: Find $\alpha$-outliers in conditional Gaussian data

Description

Given the parameters of a conditional Gaussian distribution, aout.cg identifies $\alpha$-outliers in a given data set.

Usage

aout.cg(data, param, alpha = 0.1, hide.outliers = FALSE)

Arguments

data
a matrix. First column: Class of the value, coded with an integer between 1 and d, where d is the number of classes. Second column: The value as a realization of a univariate normal with parameters $\mu$ and $\sigma$. The data set to be examined.
param
a list with three elements: p: d-dimensional vector of probabilities of the classes. mu: d-dimensional vector of univariate mean values of each class. sigma: d-dimensional vector of univariate standard errors of each class
alpha
an atomic vector. Determines the maximum amount of probability mass the outlier region may contain. Defaults to 0.1.
hide.outliers
boolean. Returns the outlier-free data if set to TRUE. Defaults to FALSE.

Value

is.outlier that flags the outliers with TRUE. If hide.outliers is set to TRUE, a data frame of the outlier-free data.

References

Edwards, D. (2000) Introduction to Graphical Modelling. 2nd edition, Springer, New York.

Kuhnt, S.; Rehage, A. (2013) The concept of $\alpha$-outliers in structured data situations. In C. Becker, R. Fried, S. Kuhnt (Eds.): Robustness and Complex Data Structures. Festschrift in Honour of Ursula Gather. Berlin: Springer, 91-108.

Examples

Run this code
ratweight <- cbind(Drug = c(1, 1, 2, 3, 1, 1, 2, 3, 1, 2, 3, 3, 1, 2, 2, 3, 1, 
                            2, 2, 3, 1, 2, 3, 3), 
                   Week1 = c(5, 7, 9, 14, 7, 8, 7, 14, 9, 7, 21, 12, 5, 7, 6, 
                             17, 6, 10, 6, 14, 9, 8, 16, 10))
aout.cg(ratweight, 
        list(p = c(1/3, 1/3, 1/3), mu = c(7, 7, 14), sigma = c(1.6, 1.4, 3.3)))

Run the code above in your browser using DataLab