dprojmedian {mrfDepth} | R Documentation |
Location estimates based on directional projection depth
Description
Computes a directional projection depth based location estimate of a
p
-dimensional dataset x
.
Usage
dprojmedian(x, dprojection.depths = NULL, options = NULL)
Arguments
x |
An |
dprojection.depths |
Vector containing the directional projection
depth of the observations in |
options |
A list of options to pass to the |
Details
The algorithm depends on the function dprojdepth
to compute the
directional projection depth of the observations in x
. If these depth values have already been computed they can be passed as an optional argument to save computing time. If not, directional projection depth values will be computed and the user
can pass a list with options to the dprojdepth
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.
Value
A list with component:
max |
The observation of |
Author(s)
J. Raymaekers
References
Rousseeuw P.J., Raymaekers J., Hubert M. (2018). A measure of directional outlyingness with applications to image data and video. Journal of Computational and Graphical Statistics, 27, 345–359.
See Also
dirOutl
, dprojdepth
, adjOutl
, outlyingness
Examples
# Compute a location estimate of a two-dimensional dataset.
data(bloodfat)
result <- dprojmedian(x = bloodfat)
plot(bloodfat, pch = 16)
points(result$max, col = "red", pch = 18, cex = 1.5)
# Options for the underlying dprojdepth routine may be passed
# using the options argument.
result <- dprojmedian(x = bloodfat, options = list(type = "Rotation", ndir = 100))
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 conmputing the median.
depth.result <- dprojdepth(x = bloodfat)
result <- dprojmedian(x = bloodfat, dprojection.depths = depth.result$depthX)