
Computes a directional projection depth based location estimate of a
x
.
dprojmedian(x, dprojection.depths = NULL, options = NULL)
A list with component:
The observation of x
with maximal directional projection
depth. If multiple points have maximum depth, their center
of gravity is returned.
An
Vector containing the directional projection
depth of the observations in x
.
A list of options to pass to the dprojdepth
routine.
See dprojdepth
for more details.
J. Raymaekers
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
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.
dirOutl
, dprojdepth
, adjOutl
, outlyingness
# 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)
Run the code above in your browser using DataLab