pdDepth: Data depth for HPD matrices

Description Usage Arguments Details Value Note References See Also Examples

View source: R/depth.R

Description

pdDepth calculates the data depth of a HPD matrix with respect to a given data cloud (i.e., a sample or collection) of HPD matrices, or the integrated data depth of a sequence (curve) of HPD matrices with respect to a given data cloud of sequences (curves) of HPD matrices as detailed in \insertCiteCOvS17pdSpecEst.

Usage

1
pdDepth(y = NULL, X, method = "gdd", metric = "Riemannian")

Arguments

y

either a (d,d)-dimensional HPD matrix, or a (d, d, n)-dimensional array corresponding to a sequence or curve of HPD matrices. Defaults to NULL, in which case the data depth of each individual object in X with respect to the data cloud X itself is calculated.

X

depending on the input y, X is either a (d,d,S)-dimensional array corresponding to a data cloud of S individual HPD matrices, or a (d,d,n,S)-dimensional array corresponding to a data cloud of S sequences or curves of n individual Hermitian PD matrices.

method

the data depth measure, one of 'gdd', 'zonoid' or 'spatial' corresponding to the geodesic distance depth, intrinsic zonoid depth, and intrinsic spatial depth respectively.

metric

the metric that the space of HPD matrices is equipped with. The default choice is "Riemannian", but this can also be one of: "logEuclidean", "Cholesky", "rootEuclidean" or "Euclidean". See also the Details section below.

Details

Available pointwise or integrated intrinsic data depth functions for samples of HPD matrices are: (i) geodesic distance depth, (ii) intrinsic zonoid depth and (iii) intrinsic spatial depth. The various data depth measures and their theoretical properties are described in \insertCiteCOvS17pdSpecEst. If y is a (d,d)-dimensional HPD matrix, X should be a (d,d,S)-dimensional array corresponding to a length S sequence of (d,d)-dimensional HPD matrices and the pointwise data depth values are computed. If y is a sequence of (d,d)-dimensional HPD matrices of length n (i.e., (d,d,n)-dimensional array), X should be a (d,d,n,S)-dimensional array of replicated sequences of HPD matrices and the integrated data depth values according to \insertCiteCOvS17pdSpecEst are computed. If is.null(y), the data depth of each individual object (i.e., a HPD matrix or a sequence of HPD matrices) in X is computed with respect to the data cloud X.
The function computes the intrinsic data depth values based on the metric space of HPD matrices equipped with one of the following metrics: (i) Riemannian metric (default) as detailed in e.g., \insertCiteB09pdSpecEst[Chapter 6] or \insertCitePFA05pdSpecEst, (ii) log-Euclidean metric, the Euclidean inner product between matrix logarithms, (iii) Cholesky metric, the Euclidean inner product between Cholesky decompositions, (iv) Euclidean metric and (v) root-Euclidean metric. The default choice (Riemannian) has several properties not shared by the other metrics, see \insertCiteCOvS17pdSpecEst for more details.

Value

If !is.null(y), pdDepth returns the numeric depth value of y with respect to X. If is.null(y), pdDepth returns a numeric vector of length S corresponding to the vector of depth values for each individual object in X with respect to X itself.

Note

The function does not check for positive definiteness of the input matrices, and may fail if matrices are close to being singular.

The data depth computations under the Riemannian metric are more involved than under the other metrics, and may therefore result in (significantly) higher computation times.

References

\insertAllCited

See Also

pdDist, pdRankTests

Examples

1
2
3
4
5
6
7
8
9
## Pointwise depth
X1 <- replicate(50, Expm(diag(2), H.coeff(rnorm(4), inverse = TRUE)))
pdDepth(y = diag(2), X = X1) ## depth of one point
pdDepth(X = X1) ## depth of each point in the data cloud

## Integrated depth
X2 <- replicate(50, replicate(5, Expm(diag(2), H.coeff(rnorm(4), inverse = TRUE))))
pdDepth(y = replicate(5, diag(2)), X2, method = "zonoid", metric = "logEuclidean")
pdDepth(X = X2, method = "zonoid", metric = "logEuclidean")

pdSpecEst documentation built on Jan. 8, 2020, 5:08 p.m.