data.prepare: Data preparation

Description Usage Arguments Details Value Examples

View source: R/DataPrepare.R

Description

Prepares data according to the specified parameters.

Usage

1
2
data.prepare(datatype, parameters.of.X, parameters.of.Y,
  parameter.of.estimation, horizon, intercept)

Arguments

datatype

a string. Indicates the data structure, whether the series are correlated or not. Choose from 'simple', 'block1', 'block2'. Periodic series to be implemented.

parameters.of.X

a list.

parameters.of.Y

a list.

parameter.of.estimation

a list.

horizon

a number. Forecast horizon, we use 7 in the example

intercept

a vector. Length is 10 for now, and 0 by default.

Details

(include the details for the parameters)

Value

a list of components

X

a matrix. Original covariate matrix, each column is one series. Note that it's both training and test period: hence the length is nsize + horizon

X.for.fcst

a matrix. Training period of covariate matrix, length is nsize

Xtr

a matrix. Shifted training X given required time lags, 5 lags in our example: hence 10*5 columns

Ytr

a matrix. Shifted response matrix, used for residual fitting

Ytr.single

a vector. Response in training period

Xind

X index (?)

yind

Y index (?)

Xte

a matrix. Shifted test X, 10*5 columns

Yte.single

a vector. Test response

Yte

a matrix. Test shifted response matrix

Examples

1
# later

yymmhaha/PackPaper1 documentation built on May 24, 2019, 8:55 a.m.