MacroLens

Statistical analysis

On this page

TS 2.11.15. Statistical analyses are run in the Statistics tab of the analysis workspace and saved with the analysis — when you open the analysis later they are recalculated with the latest data.

How to run an analysis

  1. Put the series you need into the analysis (apply operations if necessary, e.g. year-on-year changes).
  2. Open the Statistics tab, click New statistical analysis and choose the kind of analysis.
  3. Choose the series (for regression, the dependent variable first), the period and the parameters.
  4. Run the calculation. Results are shown as charts and tables with a short explanation in text; the Charts / Tables buttons show either or both.
  5. Some analyses create new series (regression fitted values and residuals, principal components, VAR forecasts) — you can add them to the analysis, chart them and save them.

Analyses of several series use the periods in which all chosen series have values (common sample), and the series must have the same frequency. Descriptive statistics and unit root tests also accept series of different frequencies.

Tip. Most economic series have a trend. Between two growing series, correlation or regression almost always looks “strong” even when there is no real relationship (spurious regression). Analyse changes (e.g. yoy, logdiff) or check stationarity first with unit root tests.

Correlation analysis

TS 2.11.15.1. Calculates the correlation matrix of the chosen series.

  • Methods: Pearson (linear relationship; default), Spearman (rank — monotonic relationship, more robust to outliers), Kendall (rank).
  • Results: correlation coefficients, their p-values, the number of observations and (for Pearson) 95 % confidence intervals.
  • Sample: the common sample of all series (default) or pairwise — each pair uses all periods in which both series have values.

How to read: the coefficient lies between −1 and 1. Close to 1 — strong positive relationship, close to −1 — strong negative relationship, close to 0 — no linear relationship. A p-value below 0.05 means the relationship is statistically significant at the 5 % level. Correlation does not prove causation.

Cross-correlation

TS 2.11.15.1. Shows how the values of series x shifted by k periods correlate with series y (k = −K…K). It helps to find out whether one indicator leads another: if the highest correlation occurs at a positive k, changes in x usually show up earlier than in y.

Standard deviation and descriptive statistics

TS 2.11.15.2. For each chosen series: number of observations, mean, standard deviation (sample — dividing by n − 1, and population — dividing by n), minimum, maximum, median, skewness and kurtosis, first and last period.

How to read: the standard deviation shows how far values are from the mean on average — the larger it is, the more volatile the indicator. For economic series the sample standard deviation is normally used. To compare volatility (e.g. of inflation) across periods use the period comparison analysis.

A rolling standard deviation (e.g. over 12 months) is available with the operation rolling(s, 12, "std").

Linear regression

TS 2.11.15.3–2.11.15.4. Ordinary least squares (OLS) regression with a constant. With one explanatory variable it is a simple linear regression, with several a multiple linear regression. The first chosen series is the dependent variable (y), the others are explanatory variables (x).

Results:

Statistic How to read
Coefficients The average change in y when x increases by one unit (others unchanged)
Standard error, t statistic, p-value Precision and significance of the coefficient: p < 0.05 — statistically significant
Confidence interval (95 %) The range likely to contain the true coefficient
R², adjusted R² The share of the variation of y explained by the model (0–1); adjusted R² accounts for the number of variables
F statistic Whether the model as a whole is significant
Durbin–Watson statistic Autocorrelation of residuals: about 2 — none, well below 2 — positive autocorrelation
AIC, BIC Information criteria for comparing models — lower is better
Number of observations How many periods were used

Further options: time trend, lags of the explanatory and dependent variables, robust standard errors (HC1 — heteroskedasticity, HAC — also autocorrelation).

You can add the fitted values and residuals to the analysis as series and chart them — to check whether the model reproduces the data well and whether the residuals show systematic patterns.

Vector autoregression (VAR)

TS 2.11.15.5. In a VAR model each variable is explained by its own lags and the lags of the other variables.

  • The number of lags is chosen by an information criterion (AIC, BIC, HQIC or FPE) or set manually.
  • Results: coefficients of each equation, model stability (all characteristic roots must have a modulus below 1, i.e. lie inside the unit circle — otherwise the model is unstable), Granger causality tests (whether the lags of one variable help to predict another), impulse response tables (how the variables react to a shock in one variable) and forecasts for a chosen number of periods.
  • You can add the forecasts to the analysis as series.

Use stationary series (usually changes) for a VAR model. You need many more observations than estimated coefficients.

Principal component analysis (PCA)

TS 2.11.15.6. PCA extracts from several related series a small number of uncorrelated principal components that explain the largest share of their common variation. The series are standardised first (mean 0, standard deviation 1), so different units do not matter.

Results: eigenvalues, the share of variance explained by each component and the cumulative share, loadings (how much each series contributes to a component) and the component series.

How to read: usually components with an eigenvalue above 1 are kept, or as many components as needed to explain, e.g., 80–90 % of the variance. The first component often reflects the common movement of all series (e.g. the business cycle). The sign of a component is arbitrary — the relative loadings matter.

Unit root tests

TS 2.11.15.7. Test whether a series is stationary (fluctuates around a constant mean or trend) or has a unit root (shocks have lasting effects; the series “wanders”).

Test Null hypothesis Conclusion when p < 0.05
ADF (augmented Dickey–Fuller) Unit root Series is stationary
KPSS Series is stationary Series is non-stationary
Phillips–Perron (PP) Unit root Series is stationary

Specification: c — with a constant (default), ct — with a constant and trend, n — neither. By default the ADF lag length is chosen by AIC. You can test the level of the series or directly its first or second difference.

Results: test statistic, p-value, critical values (1 %, 5 %, 10 %) and a conclusion in text.

How to read: the most reliable conclusion is when the tests agree (e.g. ADF rejects the unit root while KPSS does not reject stationarity). If the level is non-stationary but the changes are stationary, the series is integrated of order one, I(1) — analyse its changes.

Period comparison

TS 2.11.5. For two or more periods of the same series chosen by you (e.g. 2008–2012 and 2020–2024), the number of observations, mean, standard deviation, minimum, maximum and average growth rate are shown side by side. This helps to compare, e.g., the depth and duration of different crises or phases of the business cycle. To compare periods graphically use the operations.

Charts of the results

Every statistical result is shown both as tables and as charts:

Analysis Charts
Correlation heat-map of the correlation matrix; bars of the coefficients by pair of series
Cross-correlation bars of the coefficients by lag with the ±95 % band
Descriptive statistics bars of the standard deviation by series; rolling standard deviation lines
Regression actual and fitted values; residuals
VAR impulse responses (one chart per shock, with 95 % bands); forecast error variance decomposition (stacked bars); forecasts with 95 % intervals
PCA explained variance by component (scree); loadings; component series
Unit root tests the tested series with the test conclusion; test statistics compared with the 1 %, 5 % and 10 % critical values
Period comparison the periods overlaid from their start; mean, median, minimum and maximum by period; average growth by period

When the series titles share a long common part (e.g. the same indicator for several countries), the charts show only the differing part and state the common part under the chart title.

Saving and exporting results

Statistical analyses are saved with the analysis. Result tables can be copied, downloaded and printed. With Use in → Add to presentation / Add to report a result (its charts and tables) is added to a presentation or report; it is recalculated with the latest data whenever the presentation or report is opened. Downloads: the analysis as XLSX (every result table and chart as native Excel charts), PPTX and DOCX; reports as DOCX, XLSX and PDF; presentations as PPTX, XLSX and PDF.

Did this page answer your question? If not, ask the support team