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 › Structural breaks & stability
Zivot–Andrews finds a unit root when an unknown break is allowed; CUSUM and recursive coefficients show whether a regression relationship holds steady across the sample.
A series that jumps once and then trends steadily looks, to a Dickey–Fuller test, exactly like a random walk - the test cannot tell a permanent level shift from an accumulation of shocks. Perron's point in 1989 was that much of the "evidence" for unit roots in macro series was really evidence of unmodelled breaks.
Any long time series that spans a crisis, a policy change, a reunification, a pandemic. Standard unit-root tests are biased towards "non-stationary" when a break is present.
Zivot–Andrews runs the ADF regression at every candidate break date \lambda, adding a break dummy DU_t(\lambda), and takes the minimum t-statistic on the lagged level: \inf_\lambda t_{\hat{\alpha}}(\lambda). Because the date was chosen to be most favourable to rejection, the critical values are far more negative than standard ADF values. CUSUM instead accumulates recursive residuals, W_t=\sum_{j=k+1}^{t} w_j/\hat{\sigma}; under stability the path is a random walk with known bounds, and a systematic drift out of the band signals the coefficients moved.
\Delta y_t=\mu+\theta\,DU_t(\lambda)+\beta t+\alpha y_{t-1}+\sum_{i=1}^{k}c_i\,\Delta y_{t-i}+e_t
On log GDP the test returns t = -4.2706 for a level break (5% critical value -4.811, p = 0.205), -4.2712 for a trend break (5% critical -4.406, p = 0.072) and -4.3856 allowing both (5% critical -5.073, p = 0.269). The three specifications put the break at observations 169, 131 and 118 of 200 respectively - they disagree, which is itself informative, because a well-identified break shows up in the same place however it is modelled. None rejects at 5%, and only the trend-break version comes close. So the honest reading is that allowing one break does NOT rescue stationarity here: the series behaves like a unit root whether or not a break is permitted, and it should be differenced. That is the more common outcome and the more useful lesson - the interesting case, where a break flips the verdict, is worth looking for precisely because it is not the default.
| If you see this | It means | Do this |
|---|---|---|
| ADF fails to reject but Zivot–Andrews does | Stationary around a broken trend, not a unit root | Model with a break dummy; do not difference |
| Break date matches no real event | Probably an artefact | Be sceptical; check robustness to the window |
| CUSUM leaves the band | Coefficients are not constant | Split the sample or add interactions with a regime indicator |
| Recursive coefficients drift steadily | Slow structural change | Consider a rolling window or time-varying parameters |
Run this whenever Unit root tests say "non-stationary" for a series that spans a crisis or a policy regime change.
Monte Carlo experiment · F-test, Wald & Chow
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