kernel_entropy {ffp} | R Documentation |
Partial Information Kernel-Damping
Description
Find the probability distribution that can constrain the first two moments while imposing the minimal structure in the data.
Usage
kernel_entropy(x, mean, sigma = NULL)
## Default S3 method:
kernel_entropy(x, mean, sigma = NULL)
## S3 method for class 'numeric'
kernel_entropy(x, mean, sigma = NULL)
## S3 method for class 'matrix'
kernel_entropy(x, mean, sigma = NULL)
## S3 method for class 'ts'
kernel_entropy(x, mean, sigma = NULL)
## S3 method for class 'xts'
kernel_entropy(x, mean, sigma = NULL)
## S3 method for class 'tbl_df'
kernel_entropy(x, mean, sigma = NULL)
## S3 method for class 'data.frame'
kernel_entropy(x, mean, sigma = NULL)
Arguments
x |
An univariate or a multivariate distribution. |
mean |
A numeric vector in which the kernel should be centered. |
sigma |
The uncertainty (volatility) around the mean. When |
Value
A numerical vector of class ffp
with the new
probabilities distribution.
See Also
Examples
library(ggplot2)
ret <- diff(log(EuStockMarkets[ , 1]))
mean <- -0.01 # scenarios around -1%
sigma <- var(diff(ret))
ke <- kernel_entropy(ret, mean, sigma)
ke
autoplot(ke) +
scale_color_viridis_c()
[Package ffp version 0.2.2 Index]