mixed_freq_data_single: MIDAS data structure

View source: R/date.functions.R

mixed_freq_data_singleR Documentation

MIDAS data structure

Description

Creates a MIDAS data structure for a single high-frequency covariate based on low-frequency reference date.

Usage

mixed_freq_data_single(data.refdate, data.x, data.xdate, x.lag, horizon,
  est.start, est.end, disp.flag = TRUE)

Arguments

data.refdate

n by 1 date vector.

data.x

m by 1 high-frequency time series data vector.

data.xdate

m by 1 high-frequency time series date vector.

x.lag

number of high-frequency lags to construct in high-frequency time units.

horizon

forecast horizon relative to data.refdate date in high-frequency time units.

est.start

estimation start date, taken as the first ... .

est.end

estimation end date, taken as the last ... . Remaining data after this date is dropped to out-of-sample evaluation data.

disp.flag

display flag to indicate whether or not to display obtained MIDAS data strcuture in console.

Value

a list of midas data structure.

Author(s)

Jonas Striaukas

Examples

data(us_rgdp)
rgdp <- us_rgdp$rgdp
cfnai <- us_rgdp$cfnai
data.refdate <- rgdp$date
data.x <- cfnai$cfnai
data.xdate <- cfnai$date
est.start <- as.Date("1990-01-01")
est.end <- as.Date("2002-03-01")
mixed_freq_data_single(data.refdate, data.x, data.xdate, x.lag = 12, horizon = 1,
 est.start, est.end, disp.flag = FALSE)

jstriaukas/midasml documentation built on Oct. 5, 2022, 12:18 a.m.