Learn R Programming

rQCC (version 2.22.12)

Shamos: Shamos estimator

Description

Calculates the conventional Shamos, unbiased Shamos and unbiased squared Shamos estimators. The conventional Shamos is calculated by shamos which is Fisher-consistent under the normal distribution. Note that it is not unbiased with a sample of finite size. The unbiased Shamos estimator under the normal distribution is calculated by shamos.unbiased with a finite-sample unbiasing factor. The unbiased squared Shamos estimator under the normal distribution is calculated by shamos2.unbiased with a finite-sample unbiasing factor.

Usage

shamos(x, constant=1.048358, na.rm = FALSE,  IncludeEqual=FALSE)

shamos.unbiased(x, constant=1.048358, na.rm = FALSE, IncludeEqual=FALSE)

shamos2.unbiased(x, constant=1.048358, na.rm = FALSE, IncludeEqual=FALSE)

Value

They return a numeric value.

Arguments

x

a numeric vector of observations.

constant

Correction factor for the Fisher-consistency under the normal distribution

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

IncludeEqual

FALSE (default) calculates median of \(|X_i-X_j|\) with \(i < j\), while TRUE calculates median of \(|X_i-X_j|\) with \(i \le j\).

Author

Chanseok Park and Min Wang

Details

The Shamos estimator is defined as $$\textrm{Shamos}=\code{constant}\times\mathop{\mathrm{median}}_{i < j} \big(|X_i-X_j|\big)$$ where \(i,j=1,2,\ldots,n\). The default value (constant=1.048358) ensures the Fisher-consistency under the normal distribution. Note that \(\code{constant}=1/\{\sqrt{2}\,\Phi^{-1}(3/4)\}\approx 1.048358\).

The unbiased Shamos is defined as $$\textrm{Shamos}=\code{constant}\times\mathop{\mathrm{median}}_{i < j} \big(|X_i-X_j|\big)/{c_6(n)}$$ for \(i,j=1,2,\ldots,n\), where \(c_6(n)\) is the finite-sample unbiasing factor. Note that \(c_6(n)\) notation is used in Park et. al (2022), and \(c_6(n)\) is calculated using the function c4.factor{rQCC} with estimator="shamos" option.

The unbiased squared Shamos is defined as the squared shamos{rQCC} divided by \(w_6(n)\) where \(w_6(n)\) is the finite-sample unbiasing factor. Note that \(w_6(n)\) notation is used in Park et. al (2022), and \(w_6(n)\) is calculated using the function w4.factor{rQCC} with estimator="shamos2" option. Note that the square of the conventional Shamos estimator is Fisher-consistent for the variance (\(\sigma^2\)) under the normal distribution, but it is not unbiased with a sample of finite size.

References

Park, C., H. Kim, and M. Wang (2022). Investigation of finite-sample properties of robust location and scale estimators. Communications in Statistics - Simulation and Computation, 51, 2619-2645.
tools:::Rd_expr_doi("10.1080/03610918.2019.1699114")

Shamos, M. I. (1976). Geometry and statistics: Problems at the interface. In Traub, J. F., editor, Algorithms and Complexity: New Directions and Recent Results, pages 251--280. Academic Press, New York.

Lèvy-Leduc, C., Boistard, H., Moulines, E., Taqqu, M. S., and Reisen, V. A. (2011). Large sample behaviour of some well-known robust estimators under long-range dependence. Statistics, 45, 59--71.

See Also

mad.unbiased{rQCC} for calculating the unbiased sample MAD.

mad{stats} for calculating the Fisher-consistent sample MAD.

c4.factor{rQCC} for finite-sample unbiasing factor for the standard deviation (\(\sigma\)) under the normal distribution.

w4.factor{rQCC} for finite-sample unbiasing factor for the squared Shamos estimator of the variance (\(\sigma^2\)) under the normal distribution.

finite.breakdown{rQCC} for calculating the finite-sample breakdown point.

Examples

Run this code
x = c(0:10, 50)

# Fisher-consistent Shamos, but not unbiased with a finite sample. 
shamos(x)

# Unbiased Shamos. 
shamos.unbiased(x)

# Fisher-consistent squared Shamos, but not unbiased with a finite sample. 
shamos(x)^2 

# Unbiased squared Shamos. 
shamos2.unbiased(x)

Run the code above in your browser using DataLab