This function takes a fitted object from the cma_fit class and generate new scenarios for the marginal distributions.

generate_margins(model, n)

Arguments

model

An object of the cma_fit class.

n

An integer with the number of samples to be generated.

Value

An S3 list of the class marginal.

Examples

x <- matrix(diff(log(EuStockMarkets)), ncol = 4)

# fit the student t
dist <- fit_t(x)
dist
#> # Margins Estimation
#> Converged:       TRUE
#> Dimension:       4
#> AIC:            -52711.16
#> Log-Likelihood:  26374.58
#> Model:           Asymmetric Student-t

# generate new margins from the fitted model
generate_margins(dist, 10000)
#> # New Margins
#> marginal: << tbl 10000 x 4 >>