Description Usage Arguments Details Value References See Also Examples
The function Renyi
computes the Renyi entropy of a probability vector.
1 | RenyiEntropy(x, p)
|
x |
a numeric vector representing a probability distribution. |
p |
a number not equal to 1. The default is 0.5. |
The Renyi entropy is a generalization of Shannon entropy. See Example 3.4.8 of Fernholz (2002) for more details.
A number.
Fernholz, E. R. (2002) Stochastic portfolio theory. Springer.
1 2 3 | # compute the Renyi entropy of the country weights.
x <- c(0.2, 0.3, 0.5)
RenyiEntropy(x, p = 0.5)
|
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
[1] 1.224976
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.