CovLp
Weighted by depth (outlyingness) multivariate location and scatter estimators.
CovLP(x, pdim = 2, la = 1, lb = 1)
x
: The data as a matrix or data frame. If it is a matrix or data frame, then each row is viewed as one multivariate observation.pdim
: The parameter of the weighted depthla
: parameter of a simple weight function lb
: parameter of a simple weight function loc: Robust Estimate of Location:
cov: Robust Estimate of Covariance:
Returns depth weighted covariance matrix.
Using depth function one can define a depth-weighted location and scatter estimators. In case of location estimator we have
Subsequently, a depth-weighted scatter estimator is defined as
where is a suitable weight function that can be different from .
The DepthProc
package offers these estimators for weighted depth. Note that and include multivariate versions of trimmed means and covariance matrices. Their sample counterparts take the form
where are sample depth weights, .
# EXAMPLE 1 x <- mvrnorm(n = 100, mu = c(0, 0), Sigma = 3 * diag(2)) cov_x <- CovLP(x, 2, 1, 1) # EXAMPLE 2 data(under5.mort, inf.mort, maesles.imm) data1990 <- na.omit(cbind(under5.mort[, 1], inf.mort[, 1], maesles.imm[, 1])) CovLP(data1990)
depthContour
and depthPersp
for depth graphics.
Daniel Kosiorowski and Zygmunt Zawadzki from Cracow University of Economics.
Useful links