This function takes a fitted object from the cma_copula class and generate new scenarios for the copula

generate_copulas(model, n)

Arguments

model

An object of the cma_copula class.

n

An integer with the number of samples to be generated.

Value

An S3 list of the class bla bla bla.

Examples

x <- matrix(diff(log(EuStockMarkets)), ncol = 4)
colnames(x) <- c("a", "b", "c", "d")

# fit normal copula
sep  <- cma_separation(x)
normcop <- fit_copula_normal(sep)

generate_copulas(normcop, 10)
#> # A tibble: 10 × 4
#>      ...1   ...2   ...3   ...4
#>     <dbl>  <dbl>  <dbl>  <dbl>
#>  1 0.816  0.804  0.386  0.281 
#>  2 0.196  0.593  0.511  0.480 
#>  3 0.0528 0.0618 0.534  0.169 
#>  4 0.164  0.233  0.0203 0.579 
#>  5 0.0797 0.0129 0.146  0.101 
#>  6 0.726  0.593  0.707  0.470 
#>  7 0.888  0.403  0.603  0.507 
#>  8 0.845  0.797  0.535  0.426 
#>  9 0.533  0.573  0.405  0.576 
#> 10 0.137  0.128  0.191  0.0500