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

Description Usage Arguments Details Value Author(s) Examples

View source: R/modsel.R

Description

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

Usage

1
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

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.

Value

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

Author(s)

Virmantas Kvedaras, Vaidotas Zemlys

Examples

1
2
3
4
5
6
7
#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)

midasr documentation built on Feb. 23, 2021, 5:11 p.m.