View source: R/covariance_Mscat.R
Mscat | R Documentation |
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).
Mscat(x, loss, losspar = NULL, invC = NULL, printitn = 0)
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) |
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
File location : covariance_Mscat.R
Mscat(matrix(rnorm(15), 5, 3), loss = 'Huber')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.