simHMM {HMM} | R Documentation |
Simulate states and observations for a Hidden Markov Model
Description
Simulates a path of states and observations for a given Hidden Markov Model.
Usage
simHMM(hmm, length)
Arguments
hmm |
A Hidden Markov Model. |
length |
The length of the simulated sequence of observations and states. |
Format
Dimension and Format of the Arguments.
- hmm
A valid Hidden Markov Model, for example instantiated by
initHMM
.
Value
The function simHMM
returns a path of states and associated observations:
states |
The path of states. |
observations |
The sequence of observations. |
Author(s)
Lin Himmelmann <hmm@linhi.com>, Scientific Software Development
See Also
See initHMM
for instantiation of Hidden Markov Models.
Examples
# Initialise HMM
hmm = initHMM(c("X","Y"),c("a","b","c"))
# Simulate from the HMM
simHMM(hmm, 100)
[Package HMM version 1.0.1 Index]