LH: Likelihood of the Hidden Markov Model

Description Usage Arguments Details Value

Description

This function calculates the log-likelihood of the HMM mode. For this, the scaled forward probabilities are computed.

Usage

1
LH(factor, x, m, L1, L2, L3 = NULL, L4 = NULL, L5 = NULL)

Arguments

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

Details

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 probabily is equal to one. The scaling is neccesary to tackle the underflow problem, that arrises with an increasing sample size.

Value

negative Likelihood


pneff93/HMM documentation built on Oct. 26, 2019, 8:16 a.m.