FHCSpsdo: Computes the univariate MCD estimator of scatter

Description Usage Arguments Value Author(s) References Examples

View source: R/FastHCS.R

Description

Pseudo Stahel Donoho Outlyingness based estimates of PCA.

Usage

1
  FHCSpsdo(z0,h=NULL,seed=1,q=NULL,ndir=1000)

Arguments

z0

Either a data matrix or the result of a call to FHCSkernelEVD.

h

Number of observation used to compute the univairate outlyingness. Defaults to [(n+q+1)/2]+1.

seed

Seed used to initialize the RNG. Defaults to 1.

q

Number of components. Defaults to ncol(z0).

ndir

Number of projection used to compute the PP outlyngness.

Value

A list with components:

rawDist:

Outlyingness index of the data on the raw q-dimensonal subset that initialized H*.

best:

the indexes of the members of the H+, the FastHSC subset after the C-steps.

center:

the p-vector of column means of the observations with indexes in best.

loadings:

the (rank q) loadings matrix of the observations with indexes in best.

eigenvalues:

the first min(q) eigenvalues of the observations with indexes in best.

Author(s)

Vakili Kaveh.

References

Rousseeuw, P. J. (1984), Least Median of Squares Regression, Journal of the American Statistical Association,79,871–880.

Examples

1
2
3
4
n<-50
p<-10
x<-matrix(rnorm(n*p),nc=p)
FHCSpsdo(x)

Example output

Loading required package: matrixStats
Loading required package: robustbase

Attaching package: 'robustbase'

The following objects are masked from 'package:matrixStats':

    colMedians, rowMedians

$loadings
             [,1]        [,2]        [,3]        [,4]       [,5]        [,6]
 [1,] -0.32599356 -0.03222835  0.76764696  0.11781725 -0.1357943  0.19626901
 [2,] -0.22866034  0.21584131 -0.10342494 -0.03899283  0.3026273 -0.23463812
 [3,]  0.00407503  0.22592219 -0.36794329 -0.35123902  0.1349252  0.23016936
 [4,] -0.02860658 -0.22611041 -0.25507632  0.39938317  0.2388626  0.30278135
 [5,] -0.24008597  0.56797843 -0.07290507  0.04426362 -0.5373841 -0.21890877
 [6,]  0.14855406  0.34383244  0.10528863 -0.20510133  0.2232630 -0.34983966
 [7,]  0.39948004  0.35401336  0.31632011  0.34908612  0.4978935 -0.12841271
 [8,]  0.41683380  0.24054506  0.20049471 -0.43188532 -0.0857994  0.59162125
 [9,]  0.43589931 -0.45201950  0.12960203 -0.29081125 -0.1983885 -0.47094054
[10,]  0.48739634  0.14791162 -0.16162044  0.51452876 -0.4259941  0.05629917
            [,7]          [,8]        [,9]      [,10]
 [1,]  0.1218146  0.0678848145  0.26956829 -0.3747679
 [2,]  0.7720219  0.1634473450 -0.28267358 -0.1990838
 [3,] -0.1385255 -0.2051329498  0.29264654 -0.6870938
 [4,]  0.3562292 -0.1621691881  0.60335554  0.2398270
 [5,]  0.1216340 -0.4235933830  0.19555569  0.2081199
 [6,] -0.1115587  0.5424078409  0.54308613  0.1809154
 [7,] -0.1150036 -0.4476752310 -0.10594850 -0.0626014
 [8,]  0.3170321  0.0005311426 -0.07998267  0.2781735
 [9,]  0.2973762 -0.2964929804  0.21512992 -0.1433098
[10,]  0.1168198  0.3719397030 -0.02570800 -0.3352886

$center
           [,1]       [,2]       [,3]      [,4]        [,5]       [,6]
[1,] -0.1037073 0.01717952 -0.2357102 0.1566028 0.008411105 -0.1484695
          [,7]         [,8]      [,9]      [,10]
[1,] 0.1485462 -0.009660683 0.3273563 -0.1256154

$eigenvalues
 [1] 1.9881461 1.2174201 0.9708048 0.8981230 0.6404025 0.5325128 0.4342508
 [8] 0.3789122 0.2588298 0.1744696

$rawDist
 [1] 4.319449 3.151136 3.430526 4.969975 4.380606 2.304139 3.747982 2.585066
 [9] 3.891721 5.023483 5.728864 5.651247 4.191741 3.523646 3.999298 5.387860
[17] 7.106039 4.932351 4.544998 6.706941 5.064724 5.778229 3.665178 4.217701
[25] 4.687435 5.372697 6.245772 4.912896 5.991619 4.461621 3.295820 5.374112
[33] 4.479933 6.976959 3.199634 7.014555 4.397395 7.518493 5.085776 5.071970
[41] 4.086284 8.418691 9.365497 2.844602 3.629393 3.311710 4.037383 6.843141
[49] 4.963339 3.621095
attr(,"Csingle")
[1] TRUE

$rank
[1] 10

$best_D
 [1] 50  2  3 46 44  6 35  8 31 14  1 47 13 45 15 41  7  9 24 23 33 37  5 30 10
[26] 25 49 28  4 19 18

FastHCS documentation built on July 8, 2020, 7:14 p.m.