transformData {VARcpDetectOnline} | R Documentation |
Transform Data for VAR Estimation
Description
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.
Usage
transformData(data, p, opt)
Arguments
data |
A numeric matrix or data frame with time series data (observations in rows, variables in columns). |
p |
Integer. The order of the VAR model (number of lags). |
opt |
List. Options for data transformation. Supported options include:
|
Value
A list with the following components:
X |
The design matrix (via the Kronecker product) for lagged predictors. |
y |
A vectorized response corresponding to the lagged data. |
series |
The (centered and possibly scaled) original time series matrix. |
mu |
A row vector of the column means used for centering. |