Uses the edge probabilities from G to calculate the log likelihood of the model.
Usage
LogLike.APFA(G, dat, complete.cases=TRUE)
Arguments
G
a fitted APFA
dat
a data frame that contains the same variables that G is based on.
complete.cases
a Boolean that determines whether incomplete cases are included in the calculations (see Details).
Value
Returns the log-likelihood and the per-symbol log-likelihood.
Details
An observation in the data may not be in the sample space of the APFA, i.e. there may not a root-to-sink path in the APFA generating
the observation. However, there will be a partial path, that is, generating the initial part of the observation.
If complete.cases is true, such observations are excluded from the calculations, otherwise contributions from the partial path are included.
See the reference below for the per-symbol log-likelihood.
References
Thollard, F.; Dupont, P. & de la Higuera, C. Probabilistic DFA Inference using Kullback-Leibler Divergence and Minimality 17th International Conference on Machine Learning., 2000, 975-982;
Ankinakatte, S. and Edwards, D. Modelling discrete longitudinal data using acyclic probabilistic finite automata. Submitted to Computational Statistica and Data Analysis.