# NOT RUN {
# load entropy library
library("entropy")
# observed counts for each bin
y = c(4, 2, 3, 0, 2, 4, 0, 0, 2, 1, 1)
# }
# NOT RUN {
# estimate entropy using the NSB method
entropy.NSB(y) # 2.187774
# }
# NOT RUN {
# compare to empirical estimate
entropy.empirical(y)
# }
Run the code above in your browser using DataLab