R/kurtosis.R

#' @export 
kurtosis <-
function (x, na.rm = FALSE) 
{
var=function(x,...){mean((x-mean(x,...))^2)}
    if (na.rm) 
        x <- x[!is.na(x)]
    sum((x - mean(x))^4)/(length(x) * var(x,na.rm=na.rm)^2) - 3
}

Try the TSA package in your browser

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

TSA documentation built on July 5, 2022, 5:05 p.m.