This Journal of Statistical Software article documents the R package vars, the standard toolbox for classical (non-Bayesian) vector-autoregression analysis in R. It implements three cornerstone estimators — VAR() for reduced-form vector autoregressions, SVAR() for structural VARs, and SVEC() for structural vector error-correction models — together with the full downstream apparatus: lag-order selection, diagnostic testing, restricted-model estimation, forecasting, Granger and instantaneous causality tests, impulse-response analysis, and forecast-error variance decomposition, plus conversion of a fitted VECM into its level-VAR representation. The tools are illustrated on a Canadian macroeconomic data set. The paper's focus is the implementation — how the estimation and inference are organized in R — rather than econometric theory. (JSS 27(4): 1–32.)
vars, R offered ARIMA/VARIMA estimation (base R, dse, fArma) and Bayesian VARs (MSBVAR), but no standard classical VAR/SVAR/SVEC toolkit; vars provides the "standard" frequentist tools.SVAR() recovers structural shocks from reduced-form residuals via , imposing identifying restrictions in one of three parameterizations — the A model (restrictions on the contemporaneous matrix , with ), the B model (restrictions on the shock-impact matrix , with ; recursive/Cholesky is a special case), or the combined AB model — estimated by scoring / maximum likelihood.SVEC() identifies structural shocks in a cointegrated system by combining long-run restrictions (from the common-trends / Blanchard–Quah logic, where the number of permanent shocks equals the number of common trends ) with short-run restrictions on the contemporaneous impact matrix.vars supplies lag selection (AIC/HQ/SC/FPE), residual diagnostics (serial correlation, normality, ARCH), stability/structural-break tests, forecasting with error bands, Granger and instantaneous causality, orthogonal/impulse responses with bootstrap confidence bands, and FEVD."The three cornerstone functions VAR(), SVAR() and SVEC() for estimating such models, [plus] functions for diagnostic testing, estimation of a restricted models, prediction, causality analysis, impulse response analysis and forecast error variance decomposition are provided too."
"The methods and functions provided in the package vars try to fill a gap in the econometrics' methods landscape of R by providing the 'standard' tools in the context of VAR, SVAR and SVEC analysis."
vars is to classical VAR analysis in R what a stats-package menu is to the frequentist macroeconometrician: it doesn't advance theory, but by wrapping estimation, identification (A/B/AB SVAR and long-run SVEC), IRFs with bootstrap bands, FEVD, and causality tests behind one consistent interface it became the reproducible default for teaching and applied work. For this wiki it is the practical hub that ties together the otherwise separate pages on VARs, structural identification, cointegration/VECM, impulse responses, and variance decomposition — the classical, restriction-based counterpart to the Bayesian (BVAR via MSBVAR/bvar) and sign-restriction (VARsignR) toolkits catalogued elsewhere here. Its deliberate limitation is scope: it is the recursive/parametric-restriction world, so time-varying-parameter, stochastic-volatility, and Bayesian-shrinkage models live in other packages.