hmmProcess calculates the probability distribution of a random process following a Markov chain
hmmProcess(prior, trans_mat, n)
Numeric vector or a one row matrix of length K representing the prior probabilities of the Markov chain.
Matrix of size \((K, K)\) representing the transition matrix of the Markov chain.
Numeric. Number of variables of the Markov chain.
Matrix of size \((n, K)\) giving the distribution of process given the K-state Markov chain parameters.
hmmProcess calculates the distribution \(P(Z_{1},\dots,Z_{n};\pi,A)\) of a Markov chain \((Z_{1},\dots,Z_{n})\) with prior probability \(\pi\) and transition matrix \(A\).
The calculation is based on the following formula:
\(P(Z_{i} = k) = \sum_{l} P(Z_{i} = k, Z_{i-1} = l) = \sum_{l} P(Z_{i} = k | Z_{i-1} = l) \times P(Z_{i-1} = l) = \sum_{l} A_{lk} \times P(Z_{i-1})\)