| distance {orthoDr} | R Documentation | 
Compute Distance Correlation
Description
Calculate the distance correlation between two linear spaces.
Usage
distance(s1, s2, type = "dist", x = NULL)
Arguments
| s1 | First space | 
| s2 | Second space | 
| type | Type of distance measures:  | 
| x | The covariate values, for canonical correlation only. | 
Value
The distance between s1 and s2.
Examples
# two spaces
failEDR <- as.matrix(cbind(
  c(1, 1, 0, 0, 0, 0),
  c(0, 0, 1, -1, 0, 0)
))
B <- as.matrix(cbind(
  c(0.1, 1.1, 0, 0, 0, 0),
  c(0, 0, 1.1, -0.9, 0, 0)
))
distance(failEDR, B, "dist")
distance(failEDR, B, "trace")
N <- 300
P <- 6
dataX <- matrix(rnorm(N * P), N, P)
distance(failEDR, B, "canonical", dataX)
[Package orthoDr version 0.6.8 Index]