Learn R Programming

RelValAnalysis (version 1.0)

RenyiEntropy:

Renyi Entropy

Description

The function Renyi computes the Renyi entropy of a probability vector.

Usage

RenyiEntropy(x, p)

Arguments

x

a numeric vector representing a probability distribution.

p

a number not equal to 1. The default is 0.5.

Value

A number.

Details

The Renyi entropy is a generalization of Shannon entropy. See Example 3.4.8 of Fernholz (2002) for more details.

References

Fernholz, E. R. (2002) Stochastic portfolio theory. Springer.

See Also

ShannonEntropy, Diversity

Examples

Run this code
# compute the Renyi entropy of the country weights.
x <- c(0.2, 0.3, 0.5)
RenyiEntropy(x, p = 0.5)

Run the code above in your browser using DataLab