Last data update: 2014.03.03

R: Symmetrized Huber Scatter Matrix
symm.huberR Documentation

Symmetrized Huber Scatter Matrix

Description

Iterative algorithm to estimate the symmetrized Huber scatter matrix.

Usage

symm.huber(X, qg = 0.9, init = NULL, eps = 1e-06, maxiter = 100, 
           na.action = na.fail)

Arguments

X

numeric data frame or matrix.

qg

tuning parameter. Should be between 0 and 1. The default is 0.9.

init

an optional matrix giving the starting value for the iteration.

eps

convergence tolerance.

maxiter

maximum number of iterations.

na.action

a function which indicates what should happen when the data contain 'NA's. Default is to fail.

Details

The symmetrized Huber scatter matrix is the regular Huber scatter matrix for the pairwise differences of the observations taken wrt to the origin.

Note that this function might be memory comsuming and slow for large data sets since the matrix is based on all pairwise difference of the observations.

The function symmhuber in the package SpatialNP offers also a k-step option. The SpatialNP package contains also the function mvhuberM for the regular multivariate Huber location and scatter estimatior.

Value

a matrix.

Author(s)

Klaus Nordhausen, klaus.nordhausen@uta.fi, and Jari Miettinen

References

Sirki<c3><a4>, S., Taskinen, S. and Oja, H. (2007), Symmetrised M-estimators of scatter. Journal of Multivariate Analysis, 98, 1611–1629.

See Also

symm.huber.wt, symmhuber, mvhuberM

Examples

set.seed(654321)
cov.matrix <- matrix(c(3,2,1,2,4,-0.5,1,-0.5,2), ncol=3)
X <- rmvnorm(100, c(0,0,0), cov.matrix)
symm.huber(X)
rm(.Random.seed)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ICSNP)
Loading required package: mvtnorm
Loading required package: ICS
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ICSNP/symm.huber.Rd_%03d_medium.png", width=480, height=480)
> ### Name: symm.huber
> ### Title: Symmetrized Huber Scatter Matrix
> ### Aliases: symm.huber
> ### Keywords: multivariate robust
> 
> ### ** Examples
> 
> set.seed(654321)
> cov.matrix <- matrix(c(3,2,1,2,4,-0.5,1,-0.5,2), ncol=3)
> X <- rmvnorm(100, c(0,0,0), cov.matrix)
> symm.huber(X)
         [,1]       [,2]       [,3]
[1,] 3.952569  2.8779834  1.2872579
[2,] 2.877983  5.1529925 -0.5936478
[3,] 1.287258 -0.5936478  2.3263341
> rm(.Random.seed)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>