Performs a likelihood ratio test to compare two discrete non-parametric
hidden Markov models.
Usage
# S3 method for hmm.discnp
anova(object, ...)
Arguments
object
An object of class “hmm.discnp” as returned by the
function hmm().
…
A second object of class “hmm.discnp”. There must be
only one such object.
Value
A list with entries
stat
The likelihood ratio statistic.
df
The degrees of freedom.
pvalue
The p-value of the test.
This list has an attribute details which is a vector
consisting of the first and second log likelihoods and the associated
numbers of parameters, in order of these numbers of parameters.
(See Warning.)
Warning
Hidden Markov models can be numerically delicate and the fitting
algorithm can converge to a local maximum of the likelihood surface
which is not the global maximum. Thus it is entirely possible
for the log likelihood of the model with the greater number of
parameters to be smaller than that of the model with the
lesser number of parameters.