R/internal-toolbox.R

Defines functions skewness

###############################################################################
## internal-toolbox.R ---
## Author          : Gilles Kratzer
## Document created   : 08/09/2017
###############################################################################

##-------------------------------------------------------------------------
## Function that computes skewness of a distribution
##-------------------------------------------------------------------------

skewness <- function(x){
  n <- length(x)
  (sum((x-mean(x))^3)/n)/(sum((x-mean(x))^2)/n)^(3/2)
}


##EOF

Try the varrank package in your browser

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

varrank documentation built on Oct. 12, 2022, 5:06 p.m.