aout.chisq {alphaOutlier}R Documentation

Find \alpha-outliers in \chi^2 data

Description

Given the parameters of a \chi^2 distribution, aout.chisq identifies \alpha-outliers in a given data set.

Usage

aout.chisq(data, param, alpha = 0.1, hide.outliers = FALSE, ncp = 0, lower = auto.l,
           upper = auto.u, method.in = "Newton", global.in = "gline", 
           control.in = list(sigma = 0.1, maxit = 1000, xtol = 1e-12, 
                             ftol = 1e-12, btol = 1e-04))

Arguments

data

a vector. The data set to be examined.

param

an atomic vector. Contains the degrees of freedom of the \chi^2 distribution.

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.

ncp

an atomic vector. Determines the non-centrality parameter of the \chi^2 distribution. Defaults to 0.

lower

an atomic vector. First element of x from nleqslv.

upper

an atomic vector. Second element of x from nleqslv.

method.in

See method in nleqslv.

global.in

See global in nleqslv.

control.in

See control in nleqslv.

Details

The \alpha-outlier region of a \chi^2 distribution is generally not available in closed form or via the tails, such that a non-linear equation system has to be solved.

Value

Data frame of the input data and an index named is.outlier that flags the outliers with TRUE. If hide.outliers is set to TRUE, a simple vector of the outlier-free data.

Author(s)

A. Rehage

See Also

dchisq

Examples

aout.chisq(chisq.test(occupationalStatus)$statistic, 49)

[Package alphaOutlier version 1.2.0 Index]