Function to obtain the spatial signs of a multivariate dataset. The function can compute the spatial signs also with respect to a given or estimated loacation and scale.
If both location and scale have to be estimated the HR.Mest function is used, if only one has to be estimated the, estimation is done using
spatial.median or tyler.shape.
either a logical value or a numeric vector of length equal to
the number of columns of 'X'. See below for more information.
shape
either a logical value or a square numeric matrix with number of columns equal to
the number of columns of 'X'. See below for more information.
na.action
a function which indicates what should happen when the data
contain 'NA's. Default is to fail.
...
arguments that can be passed on to functions used for the estimation of location
and shape.
Details
The spatial signs U of X with location mu and shape V are given by
u_i = (x_i-mu)V^{-0.5}/||(x_i-mu)V^{-0.5}||.
If a numeric value is given as 'center' and/or 'shape' these are used as mu and/or V in the above formula.
If 'center' and/or 'shape' are 'TRUE' the values for mu and/or V are estimated, if 'FALSE' the origin is used as the
value of mu and/or the identity matrix as the value of V.
In the special case of univariate data the univariate signs of the data (centered if requested) are returned and the shape parameter is redundant.
Value
a matrix with the spatial signs of the data as rows or the univariate signs as a px1 matrix. The
centering vector and scaling matrix used are returned as attributes
'center' and 'shape'.