A user-friendly platform to quantify how an external shock - such as geopolitical risk, weather or climate anomalies, or policy and price shocks - affects a time series of interest (trade, prices, production, arrivals) through non-linear and delayed (lagged) pathways.
Shocks rarely act instantly or linearly. A sudden rise in geopolitical risk or a climate anomaly may influence trade or prices only after several months, and a large shock may matter far more than a small one. The DLNM framework captures both features at once.
Mean, median, dispersion, skewness, kurtosis, Jarque-Bera and Shapiro-Wilk normality tests and ADF stationarity test for every series.
An ARIMAX model is fitted for each response-exposure pair and the BDS test checks the residuals for remaining non-linear dependence.
A cross-basis of exposure and lag is estimated within a Gaussian GAM (mgcv) with penalised splines and REML smoothing selection.
Overall effect summed across all lags at chosen exposure levels (percentiles or user values), relative to a reference level.
Effects at selected lags with confidence intervals, Z statistics, p-values and significance stars, plus 3D and contour surfaces.
3D exposure-lag-response surface, contour map, lag-response and exposure-response curves, with Excel tables and publication-quality figures.
For a response series \(Y_t\) and an exposure series \(x_t\), the DLNM is
where \(b_j(\cdot)\) are basis functions for the exposure dimension, \(c_k(\cdot)\) basis functions for the lag dimension, \(L\) is the maximum lag, \(f(t)\) an optional trend and \(s(\cdot)\) an optional seasonal term. Penalties on \(\eta\) are selected by REML. The effect of exposure level \(x\) at lag \(\ell\) relative to a reference \(x_0\) is \(\beta_{x,\ell}\), and the cumulative effect is \(\beta_x = \sum_{\ell=0}^{L} \beta_{x,\ell}\).
Follow the steps from left to right. Every step uses the column names of your own files - nothing is fixed in advance.
Sheets: Data_Used, Descriptive_Stats, BDS_Test, Cumulative_Effects, Selected_Lag_Effects, Error_Log, Settings.
Download Excel workbook3D surface, contour, lag-response, exposure-response by lag and cumulative effect.
Prepare two files, upload them, explore, set the model and run. The tool adapts to any number of variables and any regular time frequency.
| Time | Y1 | Y2 | ... |
|---|---|---|---|
| 2015-01-01 | 768.20 | 1266.65 | ... |
| 2015-02-01 | 928.81 | 1178.63 | ... |
| Time | X1 | X2 | ... |
|---|---|---|---|
| 2015-01-01 | 106.22 | 85.59 | ... |
| 2015-02-01 | 84.38 | 88.39 | ... |
Sample Y and X files (CSV and Excel) can be downloaded on the Method > Upload data page.
All settings have sensible defaults. Main options:
| Setting | Meaning and guidance |
|---|---|
| Y / X variables | Choose which responses and exposures to analyse. Every Y is paired with every X (one DLNM per pair). |
| Transformation | Levels, log, log return [ln(Z_t) - ln(Z_t-1)], first difference, % change or standardisation. Differencing removes the first observation. |
| Seasonal period | Auto-detected from the time column (12 for monthly, 4 for quarterly, 7 for daily, 24 for hourly ...); used for the seasonal term and trend flexibility. Set it manually for plain time labels. |
| Maximum lag (L) | How many past periods the shock may influence Y (e.g. 12 months). Must be well below half the number of observations. |
| Exposure / lag basis and df | Shape flexibility in the exposure and lag dimensions. P-splines (ps) with df = 6 give a penalised DLNM; lag df is automatically limited to L + 1. |
| Trend and seasonality | Control for long-run trend (linear, quadratic or smooth) and seasonal pattern (dummies or cyclic spline). |
| Reference exposure | Effects are expressed relative to this level (median by default); its effect is zero by construction. |
| Exposure levels | Levels at which effects are reported: percentiles (5, 25, 50, 75, 95 by default), an even grid or your own values. |
| Selected lags | Lags reported in the lag-specific table and exposure-response plot. |
| BDS test | Maximum embedding dimension (m) for the BDS non-linearity test on ARIMAX residuals. |
The team behind this web application.