The function sets up the predictor matrix in a neural network for time series data.
NNsetting(zt, locY = 1, nfore = 0, lags = c(1:5), include.lagY = TRUE)
The function returns a list with following components.
x
-matrix for training a neural network.
y
-output for training a neural network.
x
-matrix for the prediction subsample.
y
-output for the prediction subsample.
data matrix, including the dependent variable Y(t)
.
location of the dependent variable (column number).
number of out-of-sample prediction (1-step ahead).
a vector containing the lagged variables used to form the x-matrix.
indicator for including lagged Y(t)
in the predictor matrix.
Tsay, R. and Chen, R. (2018). Nonlinear Time Series Analysis. John Wiley & Sons, New Jersey.