This is a full R implementation of the BUB entropy estimator adapted from Mathilde Gaillard’s version. It avoids the need for C++ and can be used either for runtime fallback or to precompute values.

bub_opti(N, m, k_max)

Arguments

N

Integer. Number of total values (length of vector).

m

Integer. Number of bins (unique values).

k_max

Integer. Number of coefficients to use.

Value

A numeric vector of entropy coefficients.