v_function: Normalized v-function EM

Description Usage Arguments Value

View source: R/General_functions.R

Description

This function calculates the v-function which is part of the estimation step. Each element in v aligns with the conditional expectation to reach state k from the previous state j given your datapoint x(t). Due to the normalizing of the factors we also need to include the corresponding weights into our function.

Usage

1
v_function(m, N, beta, p, weight, Gamma, set, u)

Arguments

m

number of likelihoods

N

length of the supplied dataset

beta

beta matrix

p

vector of likelihood probabilities of dataset

weight

weights provided by the alpha calculation

Gamma

Gamma matrix

set

index vector to align the p vector

u

output matrix of the u_function

Value

returns the coresponding values, but due to further calculation steps the m x m matrix for each timepoint of v-values is returned as one row in the output matrix.


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