powered by
Simulates a path of states and observations for a given Hidden Markov Model.
simHMM(hmm, length)
A Hidden Markov Model.
The length of the simulated sequence of observations and states.
The function simHMM returns a path of states and associated observations:
simHMM
The path of states.
The sequence of observations.
Dimension and Format of the Arguments.
A valid Hidden Markov Model, for example instantiated by initHMM.
initHMM
See initHMM for instantiation of Hidden Markov Models.
# NOT RUN { # Initialise HMM hmm = initHMM(c("X","Y"),c("a","b","c")) # Simulate from the HMM simHMM(hmm, 100) # }
Run the code above in your browser using DataLab