The function computes the spatial signs for a data set. This function differs from the function spatial.sign in the way
how observations with small norms are treated. For details see below.
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'.
Details
The spatial signs U of X with location $\mu$ and shape V are given by transforming the data points
$z_i = (x_{i}-\mu)V^{-\frac{1}{2}}$ and then computing
$$u_{i}=\frac{z_i}{\| z_i \|}.$$
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.
When the norm $\| z_i \|$ is 0 then the spatial sign is set usually to 0 as for example in the function
spatial.sign. Here however if the spatial designs are defined as
$$u_{i}=\frac{z_i}{\| z_i \|} I(\| z_i \| > eps.S) + \frac{z_i}{eps.S} I(\| z_i \| \leq eps.S).$$