powered by
This is a modified version of VAR command by allowing the users to specify which AR lags to be included in the model.
VARs(x, lags, include.mean = T, output = T, fixed = NULL)
A T-by-k data matrix of k-dimensional time series with T observations
A vector of non-zero AR lags. For instance, lags=c(1,3) denotes a VAR(3) model with Phi2 = 0.
A logical switch to include the mean vector
A logical switch to control output
A logical matrix to fix parameters to zero.
Observed time series data
The selected VAR lags
The VAR order
Parameter estimates
Information criteria of the fitted model
Residual series
Standard errors of the estimates
Residual covariance matrix
VAR coefficient matrix
A constant vector
Performs VAR estimation by allowing certain lag coefficient matrices being zero.
Tsay (2014, Chapter 2). Multivariate Time Series Analysis with R and Financial Applications. John Wiley. Hoboken, NJ.
VAR command
# NOT RUN { data("mts-examples",package="MTS") zt=log(qgdp[,3:5]) m1=VARs(zt,lags=c(1,2,4)) # }
Run the code above in your browser using DataLab