hf_lags_table: Create a high frequency lag selection table for MIDAS...

View source: R/modsel.R

hf_lags_tableR Documentation

Create a high frequency lag selection table for MIDAS regression model

Description

Creates a high frequency lag selection table for MIDAS regression model with given information criteria and minimum and maximum lags.

Usage

hf_lags_table(
  formula,
  data,
  start,
  from,
  to,
  IC = c("AIC", "BIC"),
  test = c("hAh_test"),
  Ofunction = "optim",
  weight_gradients = NULL,
  ...
)

Arguments

formula

the formula for MIDAS regression, the lag selection is performed for the last MIDAS lag term in the formula

data

a list containing data with mixed frequencies

start

the starting values for optimisation

from

a named list, or named vector with lag numbers which are the beginings of MIDAS lag structures. The names should correspond to the MIDAS lag terms in the formula for which to do the lag selection. Value NA indicates lag start at zero

to

a named list where each element is a vector with two elements. The first element is the lag number from which the lag selection starts, the second is the lag number at which the lag selection ends. NA indicates lowest (highest) lag numbers possible.

IC

the information criteria which to compute

test

the names of statistical tests to perform on restricted model, p-values are reported in the columns of model selection table

Ofunction

see midasr

weight_gradients

see midas_r

...

additional parameters to optimisation function, see midas_r

Details

This function estimates models sequentially increasing the midas lag from kmin to kmax of the last term of the given formula

Value

a midas_r_iclagtab object which is the list with the following elements:

table

the table where each row contains calculated information criteria for both restricted and unrestricted MIDAS regression model with given lag structure

candlist

the list containing fitted models

IC

the argument IC

Author(s)

Virmantas Kvedaras, Vaidotas Zemlys

Examples


data("USunempr")
data("USrealgdp")
y <- diff(log(USrealgdp))
x <- window(diff(USunempr),start=1949)
trend <- 1:length(y)

mlr <- hf_lags_table(y ~ trend + fmls(x, 12, 12,nealmon),
                     start = list(x=rep(0,3)),
                     data = list(y = y, x = x, trend = trend),
                     from=c(x=0),to=list(x=c(4,4)))
mlr


mpiktas/midasr documentation built on Aug. 24, 2022, 2:32 p.m.