.VAR | R Documentation |
Quickly estimate a VAR(p) model using Armadillo's inverse function.
.VAR(x, p = 1L)
x |
data numeric matrix with time series in columns - without missing values. |
p |
positive integer. The lag order of the VAR. |
A list containing matrices Y = x[-(1:p), ]
, X
which contains lags 1 - p of x
combined column-wise,
A
which is the np \times n
transition matrix, where n is the number of series in x
, and the VAR residual matrix res = Y - X %*% A
.
A list with the following elements:
Y |
|
X |
lags 1 - p of |
A |
|
res |
VAR residual matrix: |
var = .VAR(diff(EuStockMarkets), 3)
str(var)
var$A
rm(var)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.