TYLERshape: Tyler's Shape Matrix

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Iterative algorithm to estimate Tyler's shape matrix using a partial Newton-Raphson approach.

Usage

1
TYLERshape(X, location = TRUE, eps = 1e-06, maxiter = 100)

Arguments

X

numeric data matrix or dataframe. Missing values are not allowed.

location

logical or numeric. If FALSE, it is assumed that the scatter should be computed wrt to the origin. If TRUE the location will be estimated as the mean vector and if it is a numeric vector it will be computed wrt to the given vector.

eps

convergence tolerance, which means that the algorithm stops when the Frobenius norm of the gradient is smaller than eps.

maxiter

maximum number of iterations.

Details

The estimate is based on the new fast algorithm described in Duembgen et al. (2016). Note that Tyler's shape matrix is standardized such that it has determinant 1.

The function does not check if there are observations equal to the mean (if location=TRUE), to the provided location vector or to the origin (if location=FALSE). In these cases the function will fail.

In case maxiter is reached before convergence, the estimate at that iteration is returned and a warning is given.

Value

A list containing:

mu

Estimated location if location=TRUE, otherwise the user specified location.

Sigma

Estimated shape matrix.

iter

Number of iterations of the algorithm.

Author(s)

Lutz Duembgen and Klaus Nordhausen

References

Tyler, D.E. (1987), A distribution-free M-estimator of scatter, Annals of Statistics, 15, 234–251.

Duembgen, L., Nordhausen, K. and Schuhmacher, H. (2016), New algorithms for M-estimation of multivariate location and scatter, Journal of Multivariate Analysis, 144, 200–217. doi: 10.1016/j.jmva.2015.11.009

See Also

tyler.shape

Examples

1
2
3
4
5
6
7
8
9
TYLERshape(longley)
# compare to
# library(ICSNP)
# tyler.shape(longley)

TYLERshape(longley, location=FALSE)
# compare to
# library(ICSNP)
# tyler.shape(longley, location=0)

Example output

$mu
GNP.deflator          GNP   Unemployed Armed.Forces   Population         Year 
    101.6813     387.6984     319.3313     260.6687     117.4240    1954.5000 
    Employed 
     65.3170 

$Sigma
             GNP.deflator        GNP Unemployed Armed.Forces Population
GNP.deflator    12.793292  114.58414   61.42678    30.940787   7.687998
GNP            114.584138 1037.89856  534.48419   271.330207  69.699551
Unemployed      61.426780  534.48419  793.90844  -130.391943  41.014834
Armed.Forces    30.940787  271.33021 -130.39194   440.456188  15.089037
Population       7.687998   69.69955   41.01483    15.089037   4.749266
Year             5.465601   49.32485   28.13933    12.057188   3.336538
Employed         4.090532   37.26874   16.44562     9.886402   2.475810
                  Year  Employed
GNP.deflator  5.465601  4.090532
GNP          49.324849 37.268743
Unemployed   28.139334 16.445616
Armed.Forces 12.057188  9.886402
Population    3.336538  2.475810
Year          2.362310  1.757463
Employed      1.757463  1.371000

$iter
[1] 18

$mu
GNP.deflator          GNP   Unemployed Armed.Forces   Population         Year 
           0            0            0            0            0            0 
    Employed 
           0 

$Sigma
             GNP.deflator       GNP Unemployed Armed.Forces Population
GNP.deflator     67.40170  263.0191   208.6951     174.6547   76.89560
GNP             263.01911 1043.7347   823.0857     677.9078  298.43753
Unemployed      208.69509  823.0857   682.5417     519.0968  237.60184
Armed.Forces    174.65475  677.9078   519.0968     475.5066  199.24861
Population       76.89560  298.4375   237.6018     199.2486   87.90447
Year           1269.55096 4894.1264  3900.4637    3299.6967 1454.38492
Employed         42.83573  166.1661   131.9765     111.1626   48.97212
                   Year  Employed
GNP.deflator  1269.5510  42.83573
GNP           4894.1264 166.16609
Unemployed    3900.4637 131.97651
Armed.Forces  3299.6967 111.16260
Population    1454.3849  48.97212
Year         24127.1568 810.47337
Employed       810.4734  27.28807

$iter
[1] 22

fastM documentation built on May 2, 2019, 4:01 a.m.