ExpectationM_HMmdl {MSTest}R Documentation

Hidden Markov model log-likelihood function

Description

This function computes the log-likelihood for a Hidden Markov model and uses the Hamilton smoother to obtain smoothed probabilities of each state. This is also the expectation step in the Expectation Maximization algorithm for a Markov-switching autoregressive model.

Usage

ExpectationM_HMmdl(theta, mdl, k)

Arguments

theta

Vector of model parameters.

mdl

List with model attributes.

k

Integer determining the number of regimes.

Value

List which includes log-likelihood value and smoothed probabilities of each regime.


[Package MSTest version 0.1.5 Index]