| .VAR {dfms} | R Documentation | 
(Fast) Barebones Vector-Autoregression
Description
Quickly estimate a VAR(p) model using Armadillo's inverse function.
Usage
.VAR(x, p = 1L)
Arguments
x | 
 data numeric matrix with time series in columns - without missing values.  | 
p | 
 positive integer. The lag order of the VAR.  | 
Value
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:   | 
Examples
var = .VAR(diff(EuStockMarkets), 3)
str(var)
var$A
rm(var)
[Package dfms version 0.2.2 Index]