This is the vignette.

Out-of-sample version different t-stats timing?

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

# Estimate MCS same way that Hansen, Lunde, Nason (2011) did.
# Note: "t.min" should not be used in practice.

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

my_MCS

Results are equivalent (up to rounding and simulation error) in column 1 of page 485 in @HansenLundeNason2011Model.

-->>>>>>>> What is shown in table? Contents??

my_MCS[my_MCS[, "MCS p-val"] > 0.1, ] # actual, estimated MCS at alpha = 0.1

In-sample version KLIC, AIC, ... timing?

Alternatives

There are two other implementations of the MCS procedure available in R. One is provided by the MCS package, the other by the rugarch package. Both of them focus on the out-of-sample variant and leave the in-sample variant aside.

PLUS: https://insightr.wordpress.com/2017/09/03/combining-and-comparing-models-using-model-confidence-set/ quick and dirty by Gabriel Vasconcelos

Here, I will compare the accuracy and the performance of the three implementations.

As example data; I will use the inflation forecast exercise by @StockWatson1999Forecasting which was also studied as a test case by @HansenLundeNason2011Model. Results can therefore be compared with results therein. At least to a certain degree, because the orignial work by @HansenLundeNason2011Model contained a coding error. Due to a wrong sign, the test statistic used was t_min instead of t_max. While still consistent, the t_min statistic violates one of the assumptions made in HLN (which assumption specifically? see Corrigendum

When comparing to the original work, this error must be taken into account. Luckily, the modelconf package can produce results using both the correct and the inadvertantly used test statistic.

(caveat: t_max vs. t_min: coding error <- comment)

READ: https://pdfs.semanticscholar.org/d252/94807fa7b8302610aa5fcb8a4ddade162562.pdf

Cite: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2692118 Cite: HLN econometrica paper

References



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