VAR | R Documentation |
Perform least squares estimation of a VAR model
VAR(x, p = 1, output = T, include.mean = T, fixed = NULL)
x |
A T-by-k matrix of k-dimensional time series |
p |
Order of VAR model. Default is 1. |
output |
A logical switch to control output. Default is with output. |
include.mean |
A logical switch. It is true if mean vector is estimated. |
fixed |
A logical matrix used in constrained estimation. It is used mainly in model simplification, e.g., removing insignificant estimates. |
To remove insignificant estimates, one specifies a threshold for individual t-ratio. The fixed matrix is then defined automatically to identify those parameters for removal.
data |
Observed data |
cnst |
A logical switch to include the mean constant vector |
order |
VAR order |
coef |
Coefficient matrix |
aic,bic,hq |
Information criteria of the fitted model |
residuals |
Residuals |
secoef |
Standard errors of the coefficients to be used in model refinement |
Sigma |
Residual covariance matrix |
Phi |
AR coefficient polynomial |
Ph0 |
The constant vector |
Ruey S. Tsay
Tsay (2014, Chapter 3). Multivariate Time Series Analysis with R and Financial Applications. John Wiley. Hoboken, NJ.
refVAR command
data("mts-examples",package="MTS") gdp=log(qgdp[,3:5]) zt=diffM(gdp) m1=VAR(zt,p=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.