dist4cov {frechet} | R Documentation |
Distance between covariance matrices
Description
Distance computation between two covariance matrices
Usage
dist4cov(A = NULL, B = NULL, optns = list())
Arguments
A |
an p by p matrix |
B |
an p by p matrix |
optns |
A list of options control parameters specified by |
Details
Available control options are
- metric
Metric type choice,
"frobenius"
,"power"
,"log_cholesky"
and"cholesky"
- default:"frobenius"
, which corresponds to the power metric withalpha
equal to 1.- alpha
The power parameter for the power metric, which can be any non-negative number. Default is 1 which corresponds to Frobenius metric.
Value
A list containing the following fields:
dist |
the distance between covariance matrices |
optns |
A list containing the |
References
-
Petersen, A. and Müller, H.-G. (2016). Fréchet integration and adaptive metric selection for interpretable covariances of multivariate functional data. Biometrika, 103, 103–120.
-
Petersen, A. and Müller, H.-G. (2019). Fréchet regression for random objects with Euclidean predictors. The Annals of Statistics, 47(2), 691–719.
-
Petersen, A., Deoni, S. and Müller, H.-G. (2019). Fréchet estimation of time-varying covariance matrices from sparse data, with application to the regional co-evolution of myelination in the developing brain. The Annals of Applied Statistics, 13(1), 393–419.
Examples
# M input as array
m <- 5 # dimension of covariance matrices
M <- array(0,c(m,m,2))
for (i in 1:2) {
y0 <- rnorm(m)
aux <- diag(m) + y0 %*% t(y0)
M[,,i] <- aux
}
A <- M[,,1]
B <- M[,,2]
frobDist <- dist4cov(A=A, B=B, optns=list(metric="frobenius"))