View source: R/anova.hmm.discnp.R
anova.hmm.discnp | R Documentation |
Performs a likelihood ratio test to compare two discrete non-parametric hidden Markov models.
## S3 method for class 'hmm.discnp' anova(object, ...)
object |
An object of class “hmm.discnp” as returned by the
function |
... |
A second object of class “hmm.discnp”. There must be only one such object. |
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.)
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.
Rolf Turner
r.turner@auckland.ac.nz
hmm()
xxx <- with(SydColDisc,split(y,f=list(locn,depth))) fit1 <- hmm(xxx,K=1,itmax=10) fit2 <- hmm(xxx,K=2,itmax=10) anova(fit1,fit2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.