Description Usage Arguments Details Value References Examples
View source: R/HMMorderselectionfacility.R
This function visualizes the state inference result using HMMmlselect
. See the Manual.pdf under
data folder for a figure example.
1 | PlotHMM(y, results)
|
y |
The observed data. |
results |
The resulting output of state inference using |
See Manual.pdf in "inst/extdata" folder.
It returns the graph with the original data and the inferenced states.
Yang Chen, Cheng-Der Fuh, Chu-Lan Kao, and Samuel Kou (2019+) "Determine the number of states in hidden markov models via marginal likelihood." Submitted.
1 2 3 4 5 6 7 8 9 10 | library(HMMmlselect)
# simulate a 25 observations HMM
obs = HMMsim ( n = 25 )$obs
# perform order selection and estimation
results = HMMmlselect ( y = obs, list(Kfits = c(2,3), boolUseMclust = FALSE) )
# visualize the results, see figure 1
PlotHMM ( y = obs, results )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.