Learn R Programming

fHMM (version 1.4.3)

prepare_data: Prepare data

Description

This function simulates or reads financial data for the {fHMM} package.

Usage

prepare_data(controls, true_parameters = NULL, seed = NULL)

Value

An object of class fHMM_data.

Arguments

controls

[fHMM_controls]
An object of class fHMM_controls.

true_parameters

[NULL | fHMM_parameters]
An object of class fHMM_parameters, used as simulation parameters. By default, true_parameters = NULL, i.e., sampled true parameters.

seed

[NULL | integer(1)]
Set a seed for the data simulation. No seed by default.

Examples

Run this code
controls <- set_controls()
data <- prepare_data(controls)
class(data)
summary(data)

Run the code above in your browser using DataLab