rdepthmedian {mrfDepth} | R Documentation |
Hyperplane of maximal regression depth
Description
Computes the deepest regression, i.e. the hyperplane with maximal
regression depth given a regression dataset with p
explanatory variables. The computation is exact for simple regression, and approximate otherwise.
Usage
rdepthmedian(x, maxit = NULL)
Arguments
x |
An |
maxit |
The maximum number of iterations. |
Details
In simple regression the deepest regression fit can be computed exactly by considering all lines through two data points and taking the one with maximal regression depth. If several lines have the same maximal regression depth, their average is taken.
When p > 1
, the approximate MEDSWEEP algorithm is applied (Van Aelst et al, 2002).
It is first checked whether the data lie in a subspace of
dimension smaller than p + 1
. 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 components:
deepest |
A |
depth |
The depth of the deepest regression hyperplane. |
niter |
The number of performed iterations used in the medsweep algorithm. |
dimension |
When the data |
hyperplane |
When the data |
Author(s)
P. Segaert using Fortran code by S. Van Aelst
References
Van Aelst S., Rousseeuw P.J., Hubert M., Struyf A. (2002). The deepest regression method. Journal of Multivariate Analysis, 81, 138–166.
See Also
Examples
# Illustrate the concept of deepest regression line in the case of simple
# linear regression.
data(stars)
plot(stars, pch=16)
result <- rdepthmedian(x = stars)
abline(result$deepest, col="blue", lwd=2)
x <- matrix(rnorm(3000), ncol = 3) + 10
rdepthmedian(x = x)