seriesToBlock: Convert a 1-dimensional series to blocks

Description Usage Arguments Details

View source: R/seriesToBlock.R

Description

The functions seriesToBlock and blockToSeries convert 1-dimensional series into series of higher dimension. For instance, suppose you have a time-series that consists of T = 100 days of d = 24 hours. The function seriesToBlock converts the time-series X of Td = 2400 observations into a matrix of size c(T=100,d =24), where each line corresponds to a specific day. This function is usefull if you need to perform the prediction day by day, instead of hour by hour. The function can also be used to convert a matrix of expert prediction of dimension c(dT,K) where K is the number of experts, into an array of dimension c(T,d,K). The new arrays of observations and of expert predictions can be given to the aggregation rule procedure to perform d-dimensional predictions (i.e., day predictions).

Usage

1
2
3

Arguments

X

An array or a vector to be converted.

d

A positive integer defining the block size.

Details

The function blockToSeries performs the inverse operation.


opera documentation built on Dec. 11, 2021, 9:07 a.m.