Learn R Programming

pcaPP (version 2.0-5)

qn: scale estimation using the robust Qn estimator

Description

Returns a scale estimation as calculated by the (robust) Qn estimator.

Usage

qn(x, corrFact)

Value

The estimated scale of the data.

Arguments

x

a vector of data

corrFact

the finite sample bias correction factor. By default a value of ~ 2.219144 is used (assuming normality).

Author

Heinrich Fritz, Peter Filzmoser <P.Filzmoser@tuwien.ac.at>

Warning

Earlier implementations used a wrong correction factor for the final result. Thus qn estimations computed with package pcaPP version > 1.8-1 differ about 0.12% from earlier estimations (version <= 1.8-1).

Details

The Qn estimator computes the first quartile of the pairwise absolute differences of all data values.

References

P.J. Rousseeuw, C. Croux (1993) Alternatives to the Median Absolute Deviation, JASA, 88, 1273-1283.

See Also

Examples

Run this code
  # data with outliers
  x <- c(rnorm(100), rnorm(10, 10))
  qn(x)

Run the code above in your browser using DataLab