#' skewness
#'
#' Internal function to compute skewness during BCmvn computation and pK
#' estimation.
#'
#'
#' @param x Guassian kernel density estimation representing pANN distribution
#' @return Skewness value
#' @author Chris McGinnis
#' @references Taken from the 'modes' R package (v0.7).
#'
skewness <- function(x) {
n <- length(x)
S <- (1/n)*sum((x-mean(x))^3)/(((1/n)*sum((x-mean(x))^2))^1.5)
S <- S*(sqrt(n*(n-1)))/(n-2)
return(S)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.