X: Numeric vector of length m representing the covariates/inputs x1,…,xm.
Y: Numeric vector of length m representing the observed response/output y1,…,ym.
Kmin: The minimum number of regimes (HMMR components).
Kmax: The maximum number of regimes (HMMR components).
pmin: The minimum order of the polynomial regression.
pmax: The maximum order of the polynomial regression.
criterion: The criterion used to select the HMMR model ("BIC", "AIC").
verbose: Optional. A logical value indicating whether or not a summary of the selected model should be displayed.
Returns
selectHMMR returns an object of class ModelHMMR
representing the selected HMMR model according to the chosen criterion.
Details
selectHMMR selects the optimal HMMR model among a set of model candidates by optimizing a model selection criteria, including the Bayesian Information Criterion (BIC). This function first fits the different HMMR model candidates by varying the number of regimes K from Kmin to Kmax
and the order of the polynomial regression p from pmin to pmax. The model having the highest value of the chosen selection criterion is then selected.