Transforms the input time series data into the design matrices required for VAR estimation. This includes centering, optional scaling, and constructing the lagged predictor matrix.
transformData(data, p, opt)
A list with the following components:
The design matrix (via the Kronecker product) for lagged predictors.
A vectorized response corresponding to the lagged data.
The (centered and possibly scaled) original time series matrix.
A row vector of the column means used for centering.
A numeric matrix or data frame with time series data (observations in rows, variables in columns).
Integer. The order of the VAR model (number of lags).
List. Options for data transformation. Supported options include:
scale
: Logical. Whether to scale the data columns (default is FALSE
).
center
: Logical. Whether to center the data columns (default is TRUE
).