View source: R/main_function.R
transformData | R Documentation |
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)
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:
|
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.