Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Qn

scale estimation using the robust Qn estimator


Description

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

Usage

qn(x, corrFact)

Arguments

x

a vector of data

corrFact

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

Details

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

Value

The estimated scale of the data.

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).

Note

See the vignette "Compiling pcaPP for Matlab" which comes with this package to compile and use this function in Matlab.

Author(s)

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

References

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

See Also

Examples

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

pcaPP

Robust PCA by Projection Pursuit

v1.9-74
GPL (>= 3)
Authors
Peter Filzmoser, Heinrich Fritz, Klaudius Kalcher
Initial release
2021-04-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.