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
- 01
Open Cross-correlations
In Statistics mode, choose Cross-correlations (CCF) in the Forecasting group.
- 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.
- 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.
- 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.
- 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.
| Lag | Cross Correlation | Std. Error |
|---|---|---|
| -6 | −0.143 | 0.154 |
| -5 | −0.256 | 0.152 |
| -4 | −0.213 | 0.151 |
| -3 | 0.003 | 0.149 |
| -2 | 0.067 | 0.147 |
| -1 | 0.049 | 0.146 |
| 0 | 0.280 | 0.144 |
| 1 | 0.438 | 0.146 |
| 2 | 0.920 | 0.147 |
| 3 | 0.365 | 0.149 |
| 4 | 0.220 | 0.151 |
| 5 | 0.062 | 0.152 |
| 6 | 0.065 | 0.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.
Related procedures
- Autocorrelations (ACF and PACF)ACF
- Autoregression (AREG)AREG
- Bivariate CorrelationsCORRELATIONS
- Create Time SeriesCREATE
- Spectral AnalysisSPECTRA
- Free SPSS alternative: full coverage list
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.
SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.