nll_Rcpp {PHSMM} | R Documentation |
Evaluation of the negative HMM log-likelihood function based on the forward algorithm, written in C++
(internal function, called by the function npllHSMM
).
nll_Rcpp(allprobs, gamma, delta, T_y)
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. |
Returns the negative log-likelihood value.