sprojmedian | R Documentation |
Computes a skewness-adjusted projection depth based location estimate of a
p
-dimensional dataset x
.
sprojmedian(x, sprojection.depths = NULL, options = NULL)
x |
An |
sprojection.depths |
Vector containing the skewness-adjusted projection
depth values of the observations in |
options |
A list of options to pass to the |
The algorithm depends on the function sprojdepth
to compute the
skewness-adjusted projection depth values of the observations in x
.
If these depth have already been
computed they can be passed as an optional argument to save computing time.
If not, the skewness-adjusted projection depth values will be computed and the user
can pass a list with options to the sprojdepth
function.
It is first checked whether the data lie in a subspace of dimension smaller
than p
. If so, a warning is given, as well as the dimension of the
subspace and a direction which is orthogonal to it.
A list with component:
max |
The point of |
P. Segaert
Hubert M., Van der Veeken S. (2008). Outlier detection for skewed data. Journal of Chemometrics, 22, 235–246.
Hubert M., Rousseeuw P.J., Segaert P. (2015). Multivariate functional outlier detection. Statistical Methods & Applications, 24, 177–202.
adjOutl
, sprojdepth
, dirOutl
, outlyingness
# Compute a location estimate of a two-dimensional dataset.
data(bloodfat)
result <- sprojmedian(x = bloodfat)
plot(bloodfat, pch = 16)
points(result$max, col = "red", pch = 18, cex = 1.5)
# Options for the underlying sprojdepth routine may be passed
# using the options argument.
result <- sprojmedian(x = bloodfat,
options = list(type = "Rotation",
ndir = 1000
)
)
plot(bloodfat, pch = 16)
points(result$max, col = "red", pch = 18, cex = 1.5)
# One may also compute the depth values of the observations in the data
# separately. This avoids having to recompute them when computing the median.
depth.result <- sprojdepth(x = bloodfat)
result <- sprojmedian(x = bloodfat,
sprojection.depths = depth.result$depthX)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.