selectMHMMR {samurais} | R Documentation |
selectMHMMR implements a model selection procedure to select an optimal MHMMR model with unknown structure.
Description
selectMHMMR implements a model selection procedure to select an optimal MHMMR model with unknown structure.
Usage
selectMHMMR(X, Y, Kmin = 1, Kmax = 10, pmin = 0, pmax = 4,
criterion = c("BIC", "AIC"), verbose = TRUE)
Arguments
X |
Numeric vector of length m representing the covariates/inputs
|
Y |
Matrix of size |
Kmin |
The minimum number of regimes (c components). |
Kmax |
The maximum number of regimes (MHMMR components). |
pmin |
The minimum order of the polynomial regression. |
pmax |
The maximum order of the polynomial regression. |
criterion |
The criterion used to select the MHMMR model ("BIC", "AIC"). |
verbose |
Optional. A logical value indicating whether or not a summary of the selected model should be displayed. |
Details
selectMHMMR selects the optimal MHMMR 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 MHMMR
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.
Value
selectMHMMR returns an object of class ModelMHMMR
representing the selected MHMMR model according to the chosen criterion
.
See Also
Examples
data(multivtoydataset)
x <- multivtoydataset$x
y <- multivtoydataset[, c("y1", "y2", "y3")]
selectedmhmmr <- selectMHMMR(X = x, Y = y, Kmin = 2, Kmax = 6,
pmin = 0, pmax = 2)
selectedmhmmr$summary()