R/mvkurtosis.R

Defines functions mvkurtosis

Documented in mvkurtosis

#[export]
mvkurtosis <- function(x) {
  n <- dim(x)[1]
  m <- Rfast::colmeans(x)
  s <- (crossprod(x) - n * tcrossprod(m))/(n - 1)
  sum( Rfast::mahala(x, m, s)^2 ) / n 
}

Try the Rfast package in your browser

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

Rfast documentation built on Nov. 9, 2023, 5:06 p.m.