Description Usage Arguments Details Value References See Also Examples

This function draws independent random samples of an hidden Markov model.

1 | ```
sampleHMM(pInit, Q, pEmit, n = 1)
``` |

`pInit` |
an array of length K, containing the marginal distribution of the states for the first variable. |

`Q` |
an array of size (p-1,K,K), containing a list of p-1 transition matrices between the K states of the Markov chain. |

`pEmit` |
an array of size (p,M,K), containing the emission probabilities for each of the M possible emission states, from each of the K hidden states and the p variables. |

`n` |
the number of independent samples to be drawn (default: 1). |

Each element of the output matrix is an integer value between 0 and K-1.
The transition matrices contained in Q are defined with the same convention as in sampleDMC.
The emission propability matrices contained in pEmit are defined such that *P[X_{j}=k|H_{j}=l]=\mathrm{pEmit}[j,k,l]*,
where *H_j* is the latent variable associated to *X_j*.

A matrix of size n-by-p containing the n observed Markov chains of length p.

sesia2019SNPknock

Other models: `sampleDMC`

1 2 3 4 5 6 7 |

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.