R/kelleyskew.R

Defines functions kelleyskew

Documented in kelleyskew

kelleyskew<-function(x){
  #
  #  Compute Kelley's skewness measure for x
  #  NOTE: this procedure assumes no x values are missing
  #
  quarts <- as.numeric(quantile(x, probs = c(0.1, 0.5, 0.9)))
  num <- quarts[1] + quarts[3] - 2*quarts[2]
  denom <- quarts[3] - quarts[1]
  gskew <- num/denom
  gskew
}

Try the quantileDA package in your browser

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

quantileDA documentation built on May 29, 2017, 6:48 p.m.