View source: R/moment_matching.R
match_t | R Documentation |
Generates scenarios from the Student-t distribution that exactly matches the first two moments.
match_t(mu, sigma, nu, n, stochastic = FALSE)
mu |
A |
sigma |
A variance-covariance |
nu |
An |
n |
An |
stochastic |
A |
A tibble
in the wide format.
match_normal
x <- diff(log(EuStockMarkets)) mu <- colMeans(x) sigma <- cov(x) nu <- 5 match_t(mu, sigma, nu, 10) cor(x) cor(match_t(mu, sigma, nu, 100000)) mu colMeans(match_t(mu, sigma, nu, 100000, TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.