calcDepth: Calculating the K-sign depth

Description Usage Arguments Value Note References Examples

View source: R/calcDepth.R

Description

calcDepth calculates the K-sign depth of a given vector of residuals.

Usage

1

Arguments

res

[numeric]
numeric vector of residuals

K

[integer(1)]
the parameter K for the sign depth

transform

[logical(1)]
Should the depth be transformed by the formula N * (res - 0.5^(K-1)), so that the distribution of the K-sign depth converges for large number of data points N? Default is FALSE.

Value

[numeric(1)] the calculated K-sign depth of res.

Note

The implementation is based on a work of Dennis Malcherczyk.

References

Malcherczyk, D. (2021+). K-sign depth: Asymptotic distribution, efficient computation and applications. Dissertation in preparation.

Examples

1
2
calcDepth(rnorm(10), 3)
calcDepth(runif(100, -1, 1), 4, transform = TRUE)

melaniehorn/GSignTest documentation built on July 11, 2021, 1:18 a.m.