amidas_table: Weight and lag selection table for aggregates based MIDAS...

View source: R/modsel.R

amidas_tableR Documentation

Weight and lag selection table for aggregates based MIDAS regression model

Description

Create weight and lag selection table for the aggregates based MIDAS regression model

Usage

amidas_table(
  formula,
  data,
  weights,
  wstart,
  type,
  start = NULL,
  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

weights

the names of weights used in Ghysels schema

wstart

the starting values for the weights of the firs low frequency lag

type

the type of Ghysels schema see amweights, can be a vector of types

start

the starting values for optimisation excluding the starting values for the last term

from

a named list, or named vector with high frequency (NB!) lag numbers which are the beginnings 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

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

IC

the names of information criteria which should be calculated

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 sequentialy increasing the midas lag from kmin to kmax and varying the weights of the last term of the given formula

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

Value

a midas_r_ic_table 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

test

the argument test

weights

the names of weight functions

lags

the lags used in models

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)

tb <- amidas_table(y~trend+fmls(x,12,12,nealmon),
                   data=list(y=y,x=x,trend=trend),
                   weights=c("nealmon"),wstart=list(nealmon=c(0,0,0)),
                   start=list(trend=1),type=c("A"),
                   from=0,to=c(1,2))



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