selectMRHLP: selecMRHLP implements a model selection procedure to select...

Description Usage Arguments Details Value See Also Examples

View source: R/selectMRHLP.R

Description

selecMRHLP implements a model selection procedure to select an optimal MRHLP model with unknown structure.

Usage

1
2
selectMRHLP(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 x_{1},…,x_{m}.

Y

Matrix of size (m, d) representing a d dimension function of X observed at points 1,…,m. Y is the observed response/output.

Kmin

The minimum number of regimes (MRHLP components).

Kmax

The maximum number of regimes (MRHLP components).

pmin

The minimum order of the polynomial regression.

pmax

The maximum order of the polynomial regression.

criterion

The criterion used to select the MRHLP model ("BIC", "AIC").

verbose

Optional. A logical value indicating whether or not a summary of the selected model should be displayed.

Details

selectMRHLP selects the optimal MRHLP 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 MRHLP 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

selectMRHLP returns an object of class ModelMRHLP representing the selected MRHLP model according to the chosen criterion.

See Also

ModelMRHLP

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(multivtoydataset)

# Let's select a MRHLP model on a multivariate time series with 3 regimes:
data <- multivtoydataset[1:320, ]
x <- data$x
y <- data[, c("y1", "y2", "y3")]

selectedmrhlp <- selectMRHLP(X = x, Y = y, Kmin = 2, Kmax = 4,
                             pmin = 0, pmax = 1)

selectedmrhlp$summary()

samurais documentation built on July 28, 2019, 5:02 p.m.