EconStatsCraft rigorous, plain-spoken econometrics
Econometrics that explains itself.
Regression, panel data, time series and the whole battery of tests. Every result is followed by a verdict you can defend.
Load a dataset to see it here.
EconStatsCraft › VECM
Estimates the vector error-correction model once the Johansen test says your series are cointegrated: the long-run relationship, how fast each variable adjusts to it, and who is weakly exogenous.
A vector error correction model (VECM) is a VAR for variables that are non-stationary but cointegrated. It models their short-run changes while including an error correction term that pulls them back towards their long-run equilibrium relationship.
Use a VECM when the series are I(1) and the Johansen test finds at least one cointegrating relationship. A VAR in levels ignores the long-run constraint, and a VAR in differences throws the long-run relationship away; the VECM keeps both.
Beta is the cointegrating vector: the long-run equilibrium relationship between the variables. Alpha is the speed of adjustment: how much of last period's deviation from equilibrium each variable corrects this period. A significant negative alpha on a variable means it does the adjusting; an alpha near zero means it is weakly exogenous.
The error correction term is last period's deviation from the long-run relationship, beta times the lagged levels. Multiplied by alpha, it is the part of each variable's change that closes the gap to equilibrium.
As many as the Johansen trace or maximum-eigenvalue test supports, which must be fewer than the number of variables. Zero means no cointegration (use a VAR in differences); as many as the number of variables means the series are stationary (use a VAR in levels).
Two non-stationary series that are tied together cannot drift apart forever. A VECM formalises that: it models the CHANGES in each variable, but adds a term measuring how far the system currently sits from its long-run equilibrium. The further from equilibrium, the harder the pull back. β describes the equilibrium; α describes who does the adjusting.
After Johansen finds one or more cointegrating relationships. It is the correct model there - a VAR in differences would discard the long-run information.
Start from a VAR in levels and rewrite it as \Delta y_t=\Pi y_{t-1}+\sum_i \Gamma_i \Delta y_{t-i}+\varepsilon_t. The rank of \Pi decides everything: rank 0 means no cointegration (a VAR in differences), full rank means the series were stationary all along, and intermediate rank r means \Pi=\alpha\beta' where \beta holds the r cointegrating vectors and \alpha the adjustment speeds. Johansen estimates this by reduced-rank regression, and the trace and maximum-eigenvalue statistics test the rank.
\Delta \mathbf{y}_t=\boldsymbol{\alpha}\boldsymbol{\beta}^{\prime}\mathbf{y}_{t-1}+\sum_{i=1}^{p-1}\boldsymbol{\Gamma}_i\,\Delta\mathbf{y}_{t-i}+\boldsymbol{\varepsilon}_t
β normalised on log GDP gives (1, −0.83) on log money, so the long-run money elasticity of output is 0.83. α = −0.19 on the GDP equation and insignificant on money: output does the adjusting, correcting 19% of any gap per quarter (half-life ≈ 3.3 quarters), while money supply is weakly exogenous.
| If you see this | It means | Do this |
|---|---|---|
| Rank is 0 | No cointegration | Model in first differences - a plain VAR on Δy |
| Rank equals the number of variables | Everything was stationary | Use a VAR in levels |
| α positive and significant | Explosive - moves away from equilibrium | Check the sign convention and the normalisation |
| All α insignificant | Nothing adjusts | The cointegrating relation may be spurious |
| Results flip with the deterministic terms | Specification-driven | Justify the choice economically and report alternatives |
Cointegration determines the rank you need here. ARDL is the alternative when integration orders are mixed.
Yield curve (Nelson–Siegel / Svensson) · Dynamic factor model · Dynamic regression (ARIMAX) · Structural VAR · VAR · Granger causality · Cointegration · ARDL & bounds test
Line chart · Area chart · Bar chart · Stacked bar · Scatter plot · Bubble chart · Histogram · Box plot · Pie chart · Heat map · Rebased to 100 · Lorenz curve and Gini
World map · Bivariate map · Flow map · India - state map · India - district map
Descriptive statistics · Summary by group · Two-way table · Classical statistical tests
Multiple regression (OLS) · Logit / Probit · Tobit (censored) · Truncated regression · Multinomial logit · Ordered logit / probit · Quantile regression · Poisson / Negative binomial
Time-varying coefficients (Kalman) · Unit root tests · Correlogram (ACF / PACF) · ARIMA / SARIMA · Rolling-origin cross-validation · Theta method · Unobserved components · STL forecasting · Forecast combination · Markov regime switching · Change frequency (resample) · ARCH / GARCH volatility · Decompose & filter · Spectral analysis · Exponential smoothing · Forecast accuracy
Yield curve (Nelson–Siegel / Svensson) · Dynamic factor model · Dynamic regression (ARIMAX) · Structural VAR · VAR · Granger causality · Cointegration · VECM · ARDL & bounds test
Panel regression · Panel cointegration tests · Heterogeneous panel: Mean Group & PMG · Gravity model of trade · Dynamic panel GMM · Panel diagnostics · Panel unit-root tests
Principal components (PCA) · Factor analysis · Cluster analysis
Conjoint analysis · MaxDiff (best–worst scaling) · TURF - reach of a product line · Price sensitivity (Van Westendorp) · Market basket analysis · Perceptual map · Scale reliability (Cronbach’s alpha) · Key driver analysis
Spatial autocorrelation · Spatial regression · Heckman selection · Instrumental variables (2SLS) · Difference-in-differences · Staggered difference-in-differences · Regression discontinuity · Matching & weighting · Oaxaca–Blinder decomposition
Black–Scholes option pricing · Bond price, duration & convexity · Merton distance to default · EMI / home loan planner · CAPM / beta estimation · Multi-factor model · Portfolio optimization · Value at Risk & Expected Shortfall · Performance & drawdown · Time value of money & NPV/IRR · Equity valuation (DDM, FCF, residual income) · Cost of capital (WACC) · Binomial option pricing · Option strategies (payoff & profit) · Forwards, futures & swaps · Credit risk & Basel capital · Extreme value theory (tail risk)
Life table · Life annuity · Life insurance pricing · Chain ladder reserving · Buhlmann credibility · Survival analysis · Mortality graduation · Aggregate loss model · Ruin probability · Multi-state Markov model · Loss severity fitting
Monte Carlo experiment · F-test, Wald & Chow · Structural breaks & stability
Regression vs machine learning · Ridge / Lasso / Elastic Net · Random forest · Gradient boosting
EconStatsCraft rigorous, plain-spoken econometrics
Regression, panel data, time series and the whole battery of tests. Every result is followed by a verdict you can defend.
Load a dataset to see it here.
Pick the example closest to your question. You get a spreadsheet with the right columns and a few rows showing the expected format - replace the numbers with your own, then paste or upload it back.
Copy the header row from the table above (or from the downloaded template), put your own rows underneath, and paste the whole thing here. It is checked against the layout before anything is imported.
Or click a row in the preview below.
For a units or notes row.
Search every source at once. World Bank indicators need countries and years; everything else loads in one click.
Loading the catalogue…
The engine stays loaded, so this is quick - and it leaves your open tab and panel layout alone.
⌘/Ctrl+Enter runs the current analysis. ⌘/Ctrl+P exports the session as a PDF. Esc closes this.
In the Notebook: Enter starts a new block and
Shift+Enter a new line inside one; Backspace at the start
joins back into the paragraph above; / on an empty line inserts anything.
⌘/Ctrl+B, I, E, H and
M apply bold, italic, code, highlight and maths.
#, ##, -, 1., > and
``` at the start of a line convert it.
Sign in to run unlimited analyses.
Scroll to pan · Esc to close