SPSS command: SPSS CCF

Cross-correlations between two series

Cross-correlation measures how two series move together when one is shifted in time against the other.

Free · No account · Files stay on your device · Updated 18 October 2026

What it tells you

Crosstabs runs SPSS CCF on two aligned series, reporting the correlation and its standard error at every lag from −k to +k, so you can see whether ad spend leads sales or awareness lags media.

  • At which lag the two series are most strongly related, and in which direction.
  • Which series leads: a peak at a positive lag k means X at time t lines up with Y at time t + k.
  • Whether a correlation stands out from noise, using the standard error at each lag.

When to use it

Use it when

  • You want to know how many periods it takes for a campaign, price change or news event to show up in a tracked metric.
  • You are choosing which lag of a predictor to put into a regression or AREG model.
  • Two trackers move together and you want to check whether one is a leading indicator for the other.

Use something else when

  • Both series trend: shared trends create large spurious cross-correlations, so difference them first.
  • You need a model with significance tests for the effect: use AREG or a regression on lagged variables.
  • Either series has gaps inside the shared span: CCF needs both series complete there.

How to run it in Crosstabs

  1. 01

    Open Cross-correlations

    In Statistics mode, choose Cross-correlations (CCF) in the Forecasting group.

  2. 02

    Define the time axis

    Both series share the same time axis, so they are aligned period by period; leading and trailing gaps of either series are trimmed.

  3. 03

    Choose First series (X) and Second series (Y)

    Put the suspected driver in First series (X) and the outcome in Second series (Y), so a positive lag reads as X leading Y.

  4. 04

    Set lags and transformations

    Set Maximum lag (default 7, up to 36), and optionally Difference (0–2), Seasonal difference (0–1) and Natural log transform, applied to both series.

  5. 05

    Run and read the correlogram

    Click Run. The table lists every lag from −k to +k and the chart marks ±1.96 standard errors.

Worked example

Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.

Data

48 synthetic months of advertising spend (X, thousands) and website visits (Y, thousands). Visits are built from spend two months earlier plus noise, with a fixed seed.

Cross Correlations
LagCross CorrelationStd. Error
-6−0.1430.154
-5−0.2560.152
-4−0.2130.151
-30.0030.149
-20.0670.147
-10.0490.146
00.2800.144
10.4380.146
20.9200.147
30.3650.149
40.2200.151
50.0620.152
60.0650.154

48 time points used. A positive lag k pairs X at time t with Y at time t + k.

How to read it

The strongest cross-correlation is 0.920 at lag 2, about 6.2 times its standard error of 0.147, while the same-month correlation is only 0.280. Because the lag is positive, spend leads visits, which is how the data were built.

Output tables explained

Cross Correlations
The cross-correlation and standard error at each lag, with a note on how many time points were used and which transformations were applied. The standard error assumes the series are not cross-correlated and one is white noise.
CCF with 95% limits
A bar chart of the cross-correlations with ±1.96 SE bands; bars outside the bands deserve attention.

Assumptions and notes

  • Both series are stationary; trends or shared seasonality must be removed by differencing first.
  • The standard errors are valid only if at least one series is close to white noise; autocorrelated inputs make spurious peaks more likely.
  • Both series cover the same equally spaced time points without interior gaps.

How the results are validated

Cross-correlations at lags −7 to +7 and their standard errors match statsmodels ccf, computed in both directions, to 1e-12 on a reference pair of series. Validation evidence

Questions

How do I read a negative lag?

A peak at lag −k pairs Y at time t with X at time t + k, so Y leads X. Swap the series if you prefer the driver to sit at positive lags.

Why are all my cross-correlations large?

Two trending series correlate at every lag simply because both rise. Set Difference to 1 (and Seasonal difference to 1 for shared seasonality) and run again.

Is cross-correlation evidence of causation?

No. A lead shows timing, not cause: a third factor can drive both series at different speeds. Treat it as a hint for a model, not a conclusion.

Can I use respondent-level data?

Yes. Group rows into periods by a date or wave column and choose a Value per period for each series; both are computed on the same periods.

Run Cross-Correlations on your own data

Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.

Open the workspace

SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.