Description Usage Arguments Details Value See Also Examples

selectHMMR implements a model selection procedure to select an optimal HMMR model with unknown structure.

1 2 | ```
selectHMMR(X, Y, Kmin = 1, Kmax = 10, pmin = 0, pmax = 4,
criterion = c("BIC", "AIC"), verbose = TRUE)
``` |

`X` |
Numeric vector of length |

`Y` |
Numeric vector of length |

`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. |

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.

selectHMMR returns an object of class ModelHMMR
representing the selected HMMR model according to the chosen `criterion`

.

ModelHMMR

1 2 3 4 5 6 | ```
data(univtoydataset)
selectedhmmr <- selectHMMR(X = univtoydataset$x, Y = univtoydataset$y,
Kmin = 2, Kmax = 6, pmin = 0, pmax = 2)
selectedhmmr$plot()
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.