ffp_moments | R Documentation |
Computes the location and dispersion statistics under flexible probabilities.
ffp_moments(x, p = NULL) ## Default S3 method: ffp_moments(x, p = NULL) ## S3 method for class 'numeric' ffp_moments(x, p = NULL) ## S3 method for class 'matrix' ffp_moments(x, p = NULL) ## S3 method for class 'xts' ffp_moments(x, p = NULL) ## S3 method for class 'data.frame' ffp_moments(x, p = NULL) ## S3 method for class 'tbl_df' ffp_moments(x, p = NULL)
x |
A tabular (non-tidy) data structure. |
p |
An object of the |
A list
with 2 elements: mu
and sigma
.
x <- matrix(diff(log(EuStockMarkets)), ncol = 4) colnames(x) <- colnames(EuStockMarkets) p <- stats::runif(nrow(x)) p <- p / sum(p) ffp_moments(x = x, p = p) # compare with the standard approach colMeans(x) cov(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.