generate_margins: Generate Marginal Distributions

View source: R/generate.R

generate_marginsR Documentation

Generate Marginal Distributions

Description

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

Usage

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

# generate new margins from the fitted model
generate_margins(dist, 10000)

Reckziegel/CMA documentation built on July 13, 2022, 10:31 p.m.