estMCS.reg: Estimation of model confidence sets for linear regressions...

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

View source: R/estMCS.reg.R

Description

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.

Usage

1
estMCS.reg(data, models, B = 1000, l = 2)

Arguments

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 data to be used as a regressor in that model. The dependent variable must not be specified. It is automatically assumed to be the first column. Note that a constant will not be included unless it is one of the specified regressors.

B

A scalar integer; the number of bootstrap samples.

l

A scalar integer; the block length used in the moving-block bootstrap.

Details

For setting an appropriate value for the block length, check out the b.star function in package np.

Value

A matrix with the following columns:

If the list of models is named, the names will transferred to row names.

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.quick

Examples

 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, ]

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