simulate_hmm | R Documentation |
This helper function simulates HMM data.
simulate_hmm(
controls = list(),
hierarchy = FALSE,
states = if (!hierarchy) 2 else c(2, 2),
sdds = if (!hierarchy) "normal" else c("normal", "normal"),
horizon = if (!hierarchy) 100 else c(100, 30),
period = NA,
true_parameters = fHMM_parameters(controls = controls, hierarchy = hierarchy, states =
states, sdds = sdds),
seed = NULL
)
controls |
Either a The
Either none, all, or selected elements can be specified. Unspecified parameters are set to their default values. Important: Specifications in |
hierarchy |
A If By default, |
states |
An If By default, |
sdds |
A
The distribution parameters, i.e. the
can be fixed via, e.g., If By default, |
horizon |
A If By default, If |
period |
Only relevant if In this case, a
By default, |
true_parameters |
An object of class |
seed |
Set a seed for the data simulation. No seed per default. |
A list
containing the following elements:
time_points
, the vector
(or matrix
in the
hierarchical case) of time points,
markov_chain
, the vector
(or matrix
in the
hierarchical case) of the simulated states,
data
, the vector
(or matrix
in the hierarchical
case) of the simulated state-dependent observations,
T_star
, the numeric
vector of fine-scale chunk sizes
in the hierarchical case
simulate_hmm(states = 2, sdds = "normal", horizon = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.