View source: R/partial_information.R
kernel_entropy | R Documentation |
Find the probability distribution that can constrain the first two moments while imposing the minimal structure in the data.
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)
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 |
A numerical vector of class ffp
with the new
probabilities distribution.
double_decay
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.