View source: R/cov_help_funcs.R
sigma_sim | R Documentation |
Simulates a covariance matrix with specific properties
sigma_sim(p, corr_min, corr_max, vola_min, vola_max)
p |
an integer, indicating the number of variables. |
corr_min |
a double, indicating the minimum possible correlation across the p variables. |
corr_max |
a double, indicating the maximum possible correlation across the p variables (except the correlation with self of 1). |
vola_min |
a double, indicating the minimum possible volatility of the p variables. |
vola_max |
a double, indicating the maximum possible volatility of the p variables. |
The correlation and volatility values are drown from a uniform distribution. A condition for positive-definiteness of the resulting covariance matrix is not implemented.
a pxp covariance matrix.
sim_sigma <- sigma_sim(100, corr_min = 0.01, corr_max = 0.40, vola_min = 0.05, vola_max = 0.30)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.