Description Usage Arguments Details Value Examples
generateHMM
generates multiple trajectures of observed chain X according to the hidden Markov model.
1 2 3 |
num |
number of Markov chains |
n |
length of Markov chain (assume all chains have equal length) |
trans |
a matrix of transition probability |
u |
emission prob: mean. For the rest of arguments, the dimension must match with |
sig |
emission prob: standard deviation. |
pi0 |
initial probability. |
Assumes hidden Markov model, the emmision probability follows normal distribution.
transition probability is specified by user via trans
.
Default value: [0, 3, 7; 5, 2, 3; 5, 5, 0]/10
emission prob: mean is specified by user via u
.
It must match the dimension of trans
.
Defualt vaule u
= [0,5,-5].
emission prob: sd is specified by user via sig
.
It must match the dimension of trans
.
Defualt vaule sig
=[1,1,1].
initial probability. Default value pi0
=[1,1,1]/3
A list containing:
matrix of hidden state, Z. Each column is a Markov chain.
matrix of observed states, X. (each column corresponds to a column of Z)
pi0, the initial probability
trans
u
, sig
1 2 | set.seed(1221)
df <- generateHMM(num=2,n=10); df
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.