RenyiEntropy: Renyi Entropy

Description Usage Arguments Details Value References See Also Examples

Description

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

Usage

1

Arguments

x

a numeric vector representing a probability distribution.

p

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

Details

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

Value

A number.

References

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

See Also

ShannonEntropy, Diversity

Examples

1
2
3
# compute the Renyi entropy of the country weights.
x <- c(0.2, 0.3, 0.5)
RenyiEntropy(x, p = 0.5)

Example output

Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

[1] 1.224976

RelValAnalysis documentation built on May 2, 2019, 3:09 a.m.