R/RVcoeff.R

Defines functions RVcoeff

Documented in RVcoeff

RVcoeff <- function(X, Y) {
    Y <- scale(Y, scale=FALSE)
    X <- scale(X, scale=FALSE)
    W1 <- X %*% t(X)
    W2 <- Y %*% t(Y)
    rv <- sum(diag(W1 %*% W2)) / 
            (sum(diag(W1 %*% W1)) * sum(diag(W2 %*% W2)))^0.5
    return(rv)
}

Try the missRows package in your browser

Any scripts or data that you put into this service are public.

missRows documentation built on Nov. 8, 2020, 5:27 p.m.