Description Usage Arguments Format Value Author(s) See Also Examples

Simulates a path of states and observations for a given Hidden Markov Model.

1 |

`hmm ` |
A Hidden Markov Model. |

`length ` |
The length of the simulated sequence of observations and states. |

Dimension and Format of the Arguments.

- hmm
A valid Hidden Markov Model, for example instantiated by

`initHMM`

.

The function `simHMM`

returns a path of states and associated observations:

`states` |
The path of states. |

`observations` |
The sequence of observations. |

Lin Himmelmann <[email protected]>, Scientific Software Development

See `initHMM`

for instantiation of Hidden Markov Models.

1 2 3 4 |

```
$states
[1] "X" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "X" "X" "X" "X" "X" "X" "X"
[19] "Y" "Y" "X" "X" "X" "X" "Y" "Y" "X" "Y" "X" "X" "X" "Y" "Y" "Y" "Y" "Y"
[37] "Y" "Y" "Y" "Y" "Y" "X" "X" "Y" "Y" "Y" "Y" "X" "X" "X" "X" "X" "X" "X"
[55] "Y" "Y" "X" "X" "X" "X" "X" "Y" "Y" "Y" "Y" "Y" "X" "Y" "X" "Y" "Y" "Y"
[73] "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "Y" "X" "X" "Y" "Y" "Y" "Y" "Y" "X" "X"
[91] "X" "X" "X" "X" "Y" "Y" "Y" "Y" "Y" "Y"
$observation
[1] "c" "a" "a" "b" "a" "b" "c" "a" "b" "a" "b" "c" "a" "b" "b" "a" "b" "c"
[19] "c" "c" "b" "a" "c" "c" "c" "b" "a" "a" "b" "c" "b" "a" "c" "a" "a" "a"
[37] "c" "a" "a" "a" "c" "b" "c" "b" "c" "b" "a" "b" "a" "c" "a" "b" "c" "a"
[55] "c" "b" "c" "b" "b" "b" "b" "c" "a" "c" "b" "a" "b" "c" "c" "b" "a" "b"
[73] "c" "c" "c" "a" "a" "c" "c" "a" "c" "b" "a" "a" "b" "b" "c" "a" "a" "b"
[91] "a" "a" "c" "b" "c" "a" "c" "c" "a" "a"
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.