Spatial sign and rank covariance matrices | R Documentation |
Functions to compute spatial sign, spatial symmetrized sign, spatial rank and spatial signed rank covariance matrices
SCov(X, location = NULL, na.action = na.fail) SSCov(X, na.action = na.fail) RCov(X, na.action = na.fail) SRCov(X, location = NULL, na.action = na.fail)
X |
matrix or a data frame |
location |
numeric vector (may be missing) |
na.action |
a function which indicates what should happen when the data contain 'NA's. Default is to fail. |
These functions compute the matrices of the form
ave {S(x_i) S^T(x_i)}
where S(x_i) are the appropriate scores of the data: spatial signs, spatial symmetrized signs, spatial ranks or spatial signed ranks. These are the so called outer standardization matrices of location etc. tests based on spatial signs and ranks. They are not affine equivariant.
SCov
and SRCov
require a location vector with respect
to which they are computed. If none is provided, SCov
uses
spatial median and SRCov
uses Hodges-Lehmann estimator.
Seija Sirkia, seija.sirkia@iki.fi
Visuri, S., Koivunen, V. and Oja, H. (2000). Sign and rank covariance matrices. J. Statistical Planning and Inference, 91, 557-575.
spatial signs and ranks, corresponding shape matrices (inner standardization matrices)
A<-matrix(c(1,2,-3,4,3,-2,-1,0,4),ncol=3) X<-matrix(rt(150,1),ncol=3)%*%t(A) SCov(X) SSCov(X) RCov(X) SRCov(X) to.shape(A%*%t(A),trace=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.