Description Usage Arguments Details Value
This function calculates the log-likelihood of the HMM mode. For this, the scaled forward probabilities are computed. In respect of the LH function, the multi_LH function incorporates the multi Thetas for the indivudal likelihoods.
1 2 |
factor |
Input of variables that are unrestricted |
x |
a sample of a Hidden Markov Model |
m |
the number of states |
L1 |
likelihood of the first hidden state |
L2 |
likelihood of the second hidden state |
L3 |
optional. likelihood of the third hidden state |
L4 |
optional. likelihood of the 4th hidden state |
L5 |
optional. likelihood of the 5th hidden state |
start_index |
index parameter to assign the Thetas to their corresponding individual hidden state likelihood. |
This function computes the log-likelihood of the forward probabilities of the HMM. Given the fact that the inputed factor vector is not restricted, we need to apply a transformation to transform the factor variables to our suitable canditates Delta, Gamma and Theta. For this we apply the function trans().
The likelihood is constructed using the scaling/normalizing of the forward probabilities such that for each time point the sum of the foward probability is equal to one. The scaling is neccesary to tackle the underflow problem, that arrises with an increasing sample size.
The multi_LH function only differes in the computation of the likelihood probability vector p, because we imput multiple Thetas in the corresponding individual likelihoods.
negative Likelihood
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.