R/matrixsqrtinv.R

Defines functions matrixsqrtinv

Documented in matrixsqrtinv

matrixsqrtinv <- function(S, tol = sqrt(.Machine$double.eps))
{
  ## Square root of a Matrix
  s <- svd(S)
  nz <- s$d > tol
  S12=s$u[, nz] %*% diag(1/sqrt(s$d[nz])) %*% t(s$v[, nz])
  return(S12)
}
villardon/MultBiplotR documentation built on June 5, 2021, 8:55 a.m.