Skip to main content

7.1. Vector Autoregression, VECM and Structural VAR

Verified Environments & Platforms:EcoDataEcoLabFincoVietLOD

Methodological Part 7.1. Vector Autoregression, VECM and Structural VAR in 7. Multivariate Time Series, Local Projections and Spillover Networks provides step-by-step How-To implementation guides for 7 econometric model lessons spanning from Section 7.1.1 to 7.1.7. Full theoretical derivations are available at VietLOD Part 7.1 alongside cloud execution on EcoLab.

Video Tutorial: How-To Guide for Part 7.1: Vector Autoregression, VECM and Structural VAR in Stata 18, R 4.x, and Python 3.11+

7.1.1. Methodological Overview and Structural Equations​

  • Methodological Focus: Provides consistent estimation and robust inference for Vector Autoregression, VECM and Structural VAR specifications within Multivariate Time Series, Local Projections and Spillover Networks.
  • Mandatory Post-Estimation Diagnostics: Lựa chọn độ trễ tối ưu theo (AIC) / SBIC / (HQIC), điều kiện ổn định nghiệm đặc trưng nằm trong vòng tròn đơn vị và kiểm định tự tương quan (LM) phần dư đa biến.

Core structural specification for Part 7.1:

Yt=c+A1Yt−1+⋯+ApYt−p+ut,E[utut⊤]=ΣuY_t = c + A_1 Y_{t-1} + \dots + A_p Y_{t-p} + u_t, \quad \text{E}[u_t u_t^\top] = \Sigma_u

Estimator objective and moment conditions:

Yt=c+∑ℓ=1pAℓYt−ℓ+B−1Σuεt,Ψh=∂Yt+h∂εt⊤=ΦhB−1ΣuY_t = c + \sum_{\ell=1}^p A_\ell Y_{t-\ell} + B^{-1}\Sigma_u \varepsilon_t, \quad \Psi_h = \frac{\partial Y_{t+h}}{\partial \varepsilon_t^\top} = \Phi_h B^{-1}\Sigma_u
Methodological Scope Boundary:When empirical data violate the identification conditions of Part 7.1, researchers should transition to the extended methodological parts in Chapter 7 or apply appropriate instrumental-variable and cluster-robust corrections.

7.1.2. Econometric Model Lessons in Part 7.1​

7.1.1 · var
7.1.1. Vector Autoregression — VAR

Estimates the Vector Autoregression — VAR specification within the Vector Autoregression, VECM and Structural VAR framework by optimizing th...

Explore Guide
7.1.2 · vecm
7.1.2. Vector Error-Correction — VECM

Estimates the Vector Error-Correction — VECM specification within the Vector Autoregression, VECM and Structural VAR framework by optimizing...

Explore Guide
7.1.3 · svar
7.1.3. Structural Vector Autoregression — SVAR

Estimates the Structural Vector Autoregression — SVAR specification within the Vector Autoregression, VECM and Structural VAR framework by o...

Explore Guide
7.1.4 · bvar
7.1.4. Minnesota-Prior Bayesian VAR

Estimates the Minnesota-Prior Bayesian VAR specification within the Vector Autoregression, VECM and Structural VAR framework by optimizing t...

Explore Guide

7.1.3. Comparative Execution Syntax Across Stata 18, R 4.x, and Python 3.11+​

Section & Model TitleEstimator KeyStata 18 MP SyntaxR 4.x SyntaxPython 3.11+ SyntaxSupport
7.1.1 · Vector Autoregression — VARvarvar y x1 x2, lags(1/2)vars::VAR(df[, c('y', 'x1', 'x2')], p = 2, type = 'const')VAR(df[['y', 'x1', 'x2']]).fit(maxlags=2)Available
7.1.2 · Vector Error-Correction — VECMvecmvec y x1 x2, rank(1) lags(2)urca::cajorls(urca::ca.jo(df[, c('y', 'x1', 'x2')], K = 2), r = 1)VECM(df[['y', 'x1', 'x2']], k_ar_diff=1, coint_rank=1).fit()Available
7.1.3 · Structural Vector Autoregression — SVARsvarmatrix A = (1, 0 \ ., 1) -> svar y x1, lags(1/2) aeq(A)vars::SVAR(var_fit, Amat = A_mat, Bmat = NULL)SVAR(df[['y', 'x1']], svar_type='A', A=A_mat).fit(maxlags=2)Available
7.1.4 · Minnesota-Prior Bayesian VARbvarbayes, rseed(42): var y x1 x2, lags(1/2)BVAR::bvar(df[, c('y', 'x1', 'x2')], lags = 2)VAR(df[['y', 'x1', 'x2']]).fit(maxlags=2)Available

| 7.1.5 · Vector Autoregressive Moving Average Hannan Rissanen | varma_multivariate | dfactor / var y x1, lags(1/2) | MTS::VARMA | statsmodels.tsa.statespace.varmax.VARMAX / Hannan-Rissanen VARMA | Available | | 7.1.6 · Global Vector Autoregression with Foreign Star Variables | global_var_pesaran_gvar | var y x1, exog(x2) lags(1/2) | GVARX::GVARest / vars::VAR(exogen = X_star) | Trade-weighted foreign star VARX*(p, q) + weak-exogeneity F-test | Available | | 7.1.7 · Proxy Structural VAR with External Instruments | proxy_svar_external_iv | var y x1, lags(1/2) & ivregress 2sls y (x1 = z_proxy), vce(robust) | svars::id.iv / vars::VAR + 2SLS innovation projection | Reduced-form VAR innovation IV projection + Montiel-Olea-Stock-Watson effective F diagnostic | Available |

7.1.4. Standard Implementation Workflow for Part 7.1​

Step 1. Load Standardized Practice Datasets From VietLOD, EcoData, or Finco

Download the model-specific .csv practice dataset in Part 7.1 or extract custom empirical panels from EcoData and Finco.

Step 2. Select the Optimal Estimator for Your Error and Sample Structure

Compare the estimators from 7.1.1 to 7.1.7 in the syntax matrix above and execute the estimation in Stata 18 MP, R 4.x, or Python 3.11+.

Step 3. Run Mandatory Diagnostics and Export Publication Tables on EcoLab

Verify all required diagnostics including Lựa chọn độ trễ tối ưu theo (AIC) / SBIC / (HQIC), điều kiện ổn định nghiệm đặc trưng nằm trong vòng tròn đơn vị và kiểm định tự tương quan (LM) phần dư đa biến and dispatch the specification to EcoLab for automated journal-grade reporting.