inst/scatterMat.R

#' Sum of Squares (helper function)
#'
#' @param matrix data matrix
#'
#' @keywords internal
#'
#' @export
#'
scatterMat <- function(matrix){
  row <- nrow(matrix)
  t(matrix) %*% (diag(rep(1, row)) - matrix(rep(1 / row, row ^ 2), nrow = row)) %*% matrix
}
BenBarnard/covEst documentation built on May 5, 2019, 2:40 p.m.