R/divRatio.R

Defines functions divRatio

Documented in divRatio

## -*- truncate-lines: t; -*-

divRatio <- function(w, var) {
    w <- c(w)
    n <- dim(var)[[1L]]
    sqrt(var[seq(1L, n*n, by = n + 1L)]) %*% w / sqrt(w %*% var %*% w)
}

Try the NMOF package in your browser

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

NMOF documentation built on Oct. 20, 2023, 9:07 a.m.