R/stdzjoint.R

Defines functions stdzjoint

Documented in stdzjoint

#' Standardize the input matrix
#'
#' @param  X A matrix of any dimension
#' @return Returns a joint standardized matrix
#' @export

stdzjoint  <- function(X){
  Xbar <- apply(X, 2,mean)
  invSd <- matpower(cov(X),-1/2)
  Z <-  t(invSd %*% (t(X) - Xbar))
  return(Z)
}
ansoale/Pals documentation built on Oct. 5, 2020, 12:02 a.m.