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'.
Arguments
X
a numeric data frame or matrix.
center
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.
eps.S
treshold value which defines which obersvations are considered to have a small norm.
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.
Author
Klaus Nordhausen
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).$$