Function that computes complete log-likelihood of the latent Markov model with covariates in the distribution of the latent process (internal use).
lk_comp_latent(S, R, yv, Piv, PI, Psi, k, fort = TRUE, der = FALSE,
dlPsi = NULL, dlPiv = NULL, dlPI = NULL)
matrix of distinct response configurations
matrix of missing response configurations
corresponding vector of frequencies
initial probability matrix
transition probability matrices
conditional response probability matrix
number of latent classes
to use fortran routine when possible
to compute derivatives
matrix of derivatives of the logarithm of the conditional response probabilities
matrix of derivatives of the logarithm of the intial probabilities
matrix of derivatives of the logarithm of the transition probabilities
log-likelihood
matrix of the conditional probabilities of the observed response configurations
matrix of the forward probabilities
vector of marginal probabilities
derivatives of the log-likelihood
matrix of derivatives of the log-conditional probabilities of the observed response configurations
matrix of derivatives of the log-forward probabilities
matrix of second derivatives of the log-forward probabilities
matrix of derivatives of the log-marginal probabilities
Baum, L. E., Petrie, T., Soules, G., and Weiss, N. (1970). A maximization technique occurring in the statistical analysis of probabilistic functions of Markov chains. Annals of Mathematical Statistics, 41, 164-171.