Description Usage Arguments Details Value Author(s) References See Also Examples
The function allows to estimate a model confidence set a la Hansen, Lunde and Nason (2011) for the case of linear regression models. A matrix is returned that lists the entered models with their likelihood, estimated 'efficient degrees of freedom', KLIC, BIC, AIC, and the MCS p-values associated with each information criterion.
1 | estMCS.reg(data, models, B = 1000, l = 2)
|
data |
A matrix containing the data set to be used. |
models |
A list with one entry for each model. Each entry is an integer
vector that specifies the columns of matrix |
B |
A scalar integer; the number of bootstrap samples. |
l |
A scalar integer; the block length used in the moving-block bootstrap. |
For setting an appropriate value for the block length, check out the b.star
function in package np
.
A matrix with the following columns:
-2 * log-likelihood function (Q),
effective degrees of freedom (k),
KLIC, KLIC MCS p-value,
AIC, AIC MCS p-value,
BIC, BIC MCS p-value.
If the list of models is named, the names will transferred to row names.
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 13 14 15 16 17 18 19 20 | library(modelconf)
data(TR_regs)
my_data <- as.matrix(TR_regs[-(1:36),
c("FFR", "Constant", "GDPD.I", "GAP_HP", "UMP.gap", "Lab.Cost")])
models <- list(
c(2, 3, 4, 5, 6),
c(2, 4, 5, 6),
c(2, 5, 6),
c(2, 3 ),
c(2, 4 ),
c(2, 5 ),
c(2, 6),
c(2, 3, 4, 6)
)
names(models) <- paste0("model_", seq_along(models))
(my_mcs <- estMCS.reg(my_data, models, B = 20000, l = 5))
# The estimated 90% model confidence set according to AIC
my_mcs[my_mcs[, "AIC_pval"] > 1-0.9, ]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.