View source: R/simulate_nhmm.R
simulate_nhmm | R Documentation |
Simulate sequences of observed and hidden states given the parameters of a non-homogeneous hidden Markov model.
simulate_nhmm(
n_states,
emission_formula,
initial_formula = ~1,
transition_formula = ~1,
data,
id,
time,
coefs = NULL,
init_sd = 2 * is.null(coefs)
)
n_states |
An integer > 1 defining the number of hidden states. |
emission_formula |
of class |
initial_formula |
of class |
transition_formula |
of class |
data |
A data frame containing the variables used in the model
formulas. Note that this should also include also the response variable(s),
which are used to define the number of observed symbols (using |
id |
Name of the id variable in |
time |
Name of the time index variable in |
coefs |
Same as argument |
init_sd |
Standard deviation of the normal distribution used to
generate random coefficients. Default is |
A list with the model used in simulation as well as the simulated hidden state sequences.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.