Skip to main content

6.1. Unit Root and Cointegration Tests

Verified Environments & Platforms:EcoDataEcoLabFincoVietLOD

Methodological Part 6.1. Unit Root and Cointegration Tests in 6. Univariate, Nonlinear, Structural Break and Bubble Time Series provides step-by-step How-To implementation guides for 7 econometric model lessons spanning from Section 6.1.1 to 6.1.7. Full theoretical derivations are available at VietLOD Part 6.1 alongside cloud execution on EcoLab.

Video Tutorial: How-To Guide for Part 6.1: Unit Root and Cointegration Tests in Stata 18, R 4.x, and Python 3.11+

6.1.1. Methodological Overview and Structural Equations​

  • Methodological Focus: Provides consistent estimation and robust inference for Unit Root and Cointegration Tests specifications within Univariate, Nonlinear, Structural Break and Bubble Time Series.
  • Mandatory Post-Estimation Diagnostics: Lựa chọn độ trễ pp tối ưu theo tiêu chuẩn (AIC) / SBIC hoặc quy tắc tổng quát đến cụ thể của Ng–Perron, đối chiếu giá trị tới hạn MacKinnon (1996) và kiểm định Ljung–Box phần dư.

Core structural specification for Part 6.1:

ΔYt=α+βt+γYt−1+∑j=1pδjΔYt−j+εt\Delta Y_t = \alpha + \beta t + \gamma Y_{t-1} + \sum_{j=1}^p \delta_j \Delta Y_{t-j} + \varepsilon_t

Estimator objective and moment conditions:

θ^T=arg⁡max⁡θ∈ΘℓT(Y1,…,YT;θ),Φ(L)(1−L)dYt=μ+Θ(L)εt\hat{\theta}_T = \arg\max_{\theta \in \Theta} \ell_T\left(Y_1, \dots, Y_T; \theta\right), \quad \Phi(L)(1-L)^d Y_t = \mu + \Theta(L)\varepsilon_t
Methodological Scope Boundary:When empirical data violate the identification conditions of Part 6.1, researchers should transition to the extended methodological parts in Chapter 6 or apply appropriate instrumental-variable and cluster-robust corrections.

6.1.2. Econometric Model Lessons in Part 6.1​

6.1.1 · adf
6.1.1. Augmented Dickey-Fuller Unit Root Regression

Estimates the Augmented Dickey-Fuller Unit Root Regression specification within the Unit Root and Cointegration Tests framework by optimizin...

Explore Guide
6.1.2 · phillips_perron
6.1.2. Phillips-Perron Nonparametric Unit-Root Test

Applies nonparametric Newey-West Bartlett long-run variance corrections to Dickey-Fuller statistics for robustness to general serial correla...

Explore Guide
6.1.3 · df_gls
6.1.3. Elliott-Rothenberg-Stock DF-GLS Unit-Root Test

Detrends series under local-to-unity GLS alternatives and selects lags via Ng-Perron Modified AIC for substantially higher finite-sample pow...

Explore Guide
6.1.4 · kpss
6.1.4. KPSS Stationarity Regression

Estimates the KPSS Stationarity Regression specification within the Unit Root and Cointegration Tests framework by optimizing the structural...

Explore Guide
6.1.5 · zivot_andrews
6.1.5. Zivot-Andrews Structural-Break Unit-Root Test

Tests the unit-root null against stationarity around a single endogenously determined structural break in level, trend, or both. Across empi...

Explore Guide
6.1.6 · johansen
6.1.6. Johansen Multivariate Cointegration

Estimates the Johansen Multivariate Cointegration specification within the Unit Root and Cointegration Tests framework by optimizing the str...

Explore Guide

6.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
6.1.1 · Augmented Dickey-Fuller Unit Root Regressionadfdfuller y, lags(2) trendurca::ur.df(df$y, type = 'trend', lags = 2)adfuller(y, maxlag=4, regression='ct', autolag='AIC')Available
6.1.2 · Phillips-Perron Nonparametric Unit-Root Testphillips_perronpperron y, trend lags(4)urca::ur.pp(df$y, type = 'Z-tau', model = 'trend', lags = 'short')PhillipsPerron(df['y'], trend='ct', test_type='tau')Available
6.1.3 · Elliott-Rothenberg-Stock DF-GLS Unit-Root Testdf_glsdfgls y, maxlag(4)urca::ur.ers(df$y, type = 'DF-GLS', model = 'trend', lag.max = 4)DFGLS(df['y'], trend='ct', method='aic')Available
6.1.4 · KPSS Stationarity Regressionkpsskpss y, maxlag(4)tseries::kpss.test(df$y, null = 'Trend')kpss(y, regression='ct', nlags='auto')Available
6.1.5 · Zivot-Andrews Structural-Break Unit-Root Testzivot_andrewszandrews y, break(both) lagmethod(AIC)urca::ur.za(df$y, model = 'both', lag = 2)ZivotAndrews(df['y'], trend='ct', method='aic')Available
6.1.6 · Johansen Multivariate Cointegrationjohansenvecrank y x1 x2, trend(constant) lags(2)urca::ca.jo(df[, c('y', 'x1', 'x2')], type = 'trace', K = 2)coint_johansen(df[['y', 'x1', 'x2']], det_order=0, k_ar_diff=1)Available

| 6.1.7 · Elliott Rothenberg Stock DF GLS and Ng Perron M Tests | ers_dfgls_ng_perron | dfgls y, maxlag(4) | urca::ur.ers(y, type = 'DF-GLS', model = 'trend') | arch.unitroot.DFGLS + Ng-Perron MZa/MZt/MSB/MPT spectral GLS autoregression | Available |

6.1.4. Standard Implementation Workflow for Part 6.1​

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

Download the model-specific .csv practice dataset in Part 6.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 6.1.1 to 6.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ễ pp tối ưu theo tiêu chuẩn (AIC) / SBIC hoặc quy tắc tổng quát đến cụ thể của Ng–Perron, đối chiếu giá trị tới hạn MacKinnon (1996) và kiểm định Ljung–Box phần dư and dispatch the specification to EcoLab for automated journal-grade reporting.