Learn R Programming

midasr (version 0.2)

split_data: Split mixed frequency data into in-sample and out-of-sample

Description

Splits mixed frequency data into in-sample and out-of-sample datasets given the indexes of the low frequency data

Usage

split_data(data, insample, outsample)

Arguments

data
a list containing mixed frequency data
insample
the low frequency indexes for in-sample data
outsample
the low frequency indexes for out-of-sample data

Value

  • a list with elements indata and outdata containing respectively in-sample and out-of-sample data sets

Details

It is assumed that data is a list containing mixed frequency data. Then given the indexes of the low frequency data the function splits the data into two subsets.

Examples

Run this code
#Monthly data
x <- 1:24
#Quartely data
z <- 1:8
#Yearly data
y <- 1:2
split_data(list(y=y,x=x,z=z),insample=1,outsample=2)

Run the code above in your browser using DataLab