nll_Rcpp {PHSMM}R Documentation

Negative log-likelihood evaluation

Description

Evaluation of the negative HMM log-likelihood function based on the forward algorithm, written in C++ (internal function, called by the function npllHSMM).

Usage

nll_Rcpp(allprobs, gamma, delta, T_y)

Arguments

allprobs

matrix containing the state-dependent distribution values for each observation (row) and state (column), respectively.

gamma

transition probability matrix.

delta

initial distribution.

T_y

number of observations.

Value

Returns the negative log-likelihood value.


[Package PHSMM version 1.0 Index]