estMCS.quick: Estimation of a model confidence set (MCS) using an...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/estMCS.quick.R

Description

Given estimated losses of different models, this function will estimate a model confidence set and return a vector indicating which models are inside the estimated set.

Usage

1
estMCS.quick(loss, test, B, l, alpha)

Arguments

loss

A matrix of size (n x m). The columns contain the estimated losses for each of the m models.

test

A character string. It specifies the test statistic to be used. Available tests are "t.max", "t.range", and "t.min".

B

A scalar, the number of bootstrap samples.

l

A scalar, the block length used in the moving-block bootstrap.

alpha

A scalar, the significance level.

Details

This function works in a similar way to estMCS. But instead of returning the complete set of models that were fed to the function together with some additional information, this function will only return a vector of integers indicating which models are inside the estimated model confidence set. The indicated models are superior to all models that were in the initial set. Using this function instead of estMCS will be computationally less burdensome, because it stops once the MCS p-value is above the specified significance level alpha.

Value

A vector of length (m* x 1), where m* is the estimated number of superior models. The elements of the vector are integers and specify the models which are inside the estimated MCS. They refer to the order in which they occurred as columns in loss.

Author(s)

Niels Aka

References

Hansen, P. R., Lunde, A., Nason, J. M. 2011. "The Model Confidence Set", Econometrica, 79(2), 453 - 497

See Also

estMCS, estMCS.reg.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(modelconf)

data(SW_infl4cast)
data <- as.matrix(SW_infl4cast)
loss <- (data[, -1] - data[, 1])^2 # compute squared errors

(my_MCS <- estMCS.quick(loss, test = "t.min",
                        B = 25000, l = 12, alpha = 0.1))

my_MCS_all <- estMCS(loss, test = "t.min", B = 25000, l = 12)

all(my_MCS == which(my_MCS_all[, "MCS p-val"] > 0.1))

nielsaka/modelconf documentation built on Jan. 25, 2020, 12:21 p.m.