R/entropy.wts.R

Defines functions entropy.wts

Documented in entropy.wts

entropy.wts <-
function(w) 
{
    n <- length(w)
    num <- w * log(w)
    den <- log(n)
    ans <- -sum(num/den, na.rm = TRUE)
    return(ans)
}

Try the HPbayes package in your browser

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

HPbayes documentation built on May 29, 2017, 6:46 p.m.