Learn R Programming

abctools (version 0.2-2)

nn.ent: Works out entropy of a sample.

Description

The function computes the k nearest neighbour sample entropy.

Usage

nn.ent(th, k=4)

Arguments

Value

The k nearest neighbour entropy from the sample.

Warning

For high-dimensional posterior samples, the nn.ent calculation is quite computationally intensive.

Details

The sample entropy gives a measure of information in a (posterior) sample, or lack of it.

References

Singh, H. et al. (2003) Nearest neighbor estimates of entropy. Am. J. Math. Man. Sci.,23, 301--321. Shannon, C. E. and Weaver, W. (1948) A mathematical theory of communication. Bell Syst. Tech. J., 27, 379--423.

See Also

mincrit

Examples

Run this code
# create a dummy sample to calculate an entropy measure:

theta<-rnorm(10000)

nn.ent(theta)

Run the code above in your browser using DataLab