Description Usage Arguments Details Value See Also
Calculates the distribution function at each point for a dthmm
process given the complete observed process except the given point.
1 | probhmm(logalpha, logbeta, Pi, delta, cumprob)
|
logalpha |
an n*m matrix containing the logarithm of the forward probabilities. |
logbeta |
an n*m matrix containing the logarithm of the backward probabilities. |
Pi |
is the m*m transition probability matrix of the hidden Markov chain. |
delta |
is the marginal probability distribution of the m hidden states at the first time point. |
cumprob |
an n*m matrix where the (i,k)th element is Pr{Xi <= xi | Ck = ck}. |
Let X^{(-i)} denote the entire process, except with the point Xi removed. The distribution function at the point Xi is
Pr{ Xi <= xi | X^{(-i)} = x^{(-i)} } .
This R function calculates the distribution function for each point Xi for i=1, ..., n. This is done by using the forward and backward probabilities before and after the ith point, respectively.
In the programming code, note the subtraction of the mean. This is to stop underflow when the exponential is taken. Removal of the mean is automatically compensated for by the fact that the same factor is removed in both the numerator and denominator.
A vector containing the probability.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.