distcov | R Documentation |
Compute a distance between two covariance matrices, with non-Euclidean options.
distcov(S1, S2, method="Riemannian",alpha=1/2)
S1 |
Input a covariance matrix (square, symmetric, positive definite) |
S2 |
Input another covariance matrix of the same size |
method |
The type of distance to be used: "Procrustes": Procrustes size-and-shape metric, "ProcrustesShape": Procrustes metric with scaling, "Riemannian": Riemannian metric, "Cholesky": Cholesky based distance, "Power: Power Euclidean, with power alpha, "Euclidean": Euclidean metric, "LogEuclidean": Log-Euclidean metric, "RiemannianLe": Another Riemannian metric. |
alpha |
The power to be used in the power Euclidean metric |
The distance
Ian Dryden
Dryden, I.L., Koloydenko, A. and Zhou, D. (2009). Non-Euclidean statistics for covariance matrices, with applications to diffusion tensor imaging. Annals of Applied Statistics, 3, 1102-1123.
estcov
A <- diag(5) B <- A + .1*matrix(rnorm(25),5,5) S1<-A S2<- B distcov( S1, S2, method="Procrustes")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.