Description Usage Arguments Details Value Author(s) References See Also Examples
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.
1 | estMCS.quick(loss, test, B, l, alpha)
|
loss |
A matrix of size (n x m). The columns contain the estimated losses
for each of the |
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. |
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
.
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
.
Niels Aka
Hansen, P. R., Lunde, A., Nason, J. M. 2011. "The Model Confidence Set", Econometrica, 79(2), 453 - 497
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.