Description Usage Arguments Details Value Examples
estimateHMM
performs EM Algorithm on multiple trajectures of observed chain X
1 | estimateHMM(X, M, constr = matrix(1, M, M), tol = 0.001)
|
X |
a vector of observed states |
M |
the number of states of Markov chain |
constr |
a constrain matrix for transition probability:
|
tol=0.001 |
error tolerance. |
Assumes hidden Markov model, the emmision probability follows normal distribution.
Detail model parameters are given by the function generateHMM
.
Estimation would terminate in a given error tolerance.
A list containing:
mean vector, u
standard deviation vector, sig
transition matrix, trans
number of iterations used, iter
Print the class: EstConverge
1 2 3 4 5 6 | set.seed(1221)
df <- generateHMM(num=6,n=100)
estimateHMM(df$X, M=3, constr=matrix(1,3,3), tol=0.001)
constr2 <- matrix(1,3,3)
constr2[1,1] <- 0; constr2[3,3] <- 0;
estimateHMM(df$X, M=3, constr=constr2, tol=0.001)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.