Mscat: Mscat

View source: R/covariance_Mscat.R

MscatR Documentation

Mscat

Description

computes M-estimator of scatter matrix for the n x p data matrix X using the loss function 'Huber' or 't-loss' and for a given parameter of the loss function (i.e., q for Huber's or degrees of freedom v for the t-distribution).

Usage

Mscat(x, loss, losspar = NULL, invC = NULL, printitn = 0)

Arguments

x:

n x p matrix

loss:

'Huber', 't_loss' or 'Tyler'

losspar:

parameter of the loss function: q in [0,1) for Huber and d.o.f. v >= 0 for t-loss. For Tyler you do not need to specify this value. Parameter q determines the treshold c^2 as the qth quantile of chi-squared distribution with p degrees of freedom distribution (Default q = 0.8). Parameter v is the def.freedom of t-distribution (Default v = 3) if v = 0, then one computes Tyler's M-estimator

invC:

initial estimate is the inverse scatter matrix (default = inverse of the sample covariance matrix)

printitn:

integer, print iteration number (default = 0, no printing)

Value

C: the M-estimate of scatter using Huber's weights

invC: the inverse of C

iter: nr of iterations

flag: flag (true/false) for convergence

Note

File location : covariance_Mscat.R

Examples

Mscat(matrix(rnorm(15), 5, 3), loss = 'Huber')

Mufabo/Rrobustsp documentation built on June 11, 2022, 10:41 p.m.