SPSS command: SPSS SPECTRA

Spectral analysis: periodogram and spectral density

Spectral analysis breaks a series into sine and cosine waves and shows how much of its variance sits at each frequency, so cycles of any length show up as peaks.

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

What it tells you

Crosstabs runs univariate SPSS SPECTRA: the periodogram at the Fourier frequencies and a spectral density smoothed with a Tukey-Hamming, Tukey, Parzen, Bartlett or Daniell window.

  • Which cycle lengths carry the most variance, read as Period = 1 / Frequency.
  • Whether a suspected cycle (e.g. 12 months, or a 4-week fieldwork rhythm) actually stands out from neighbouring frequencies.
  • The Fourier cosine and sine coefficients behind each periodogram value.

When to use it

Use it when

  • You suspect a cycle but do not know its length, or want to confirm the periodicity before a seasonal model.
  • A long daily or weekly series may contain several overlapping rhythms.
  • You want a frequency-domain view to complement the ACF.

Use something else when

  • The series has a strong trend: low-frequency power swamps the cycles, so difference or detrend it first (e.g. with Create time series).
  • You need the coherence or phase between two series: bivariate SPECTRA is not included.
  • The series is short or has gaps: SPECTRA needs a complete series, and with few points the frequency resolution is coarse.

How to run it in Crosstabs

  1. 01

    Open Spectral analysis

    In Statistics mode, choose Spectral analysis (SPECTRA) in the Forecasting group.

  2. 02

    Define the time axis

    Map rows to equally spaced time points; fill any empty periods by linear interpolation, because gaps are not allowed.

  3. 03

    Choose the Series and Spectral window

    Pick the Series and a Spectral window: Tukey-Hamming (default), Tukey (Hanning), Parzen, Bartlett, Daniell (unit) or None.

  4. 04

    Set the Span

    Set the window Span (default 5, odd values up to 51). Wider spans smooth more but blur nearby peaks. Optionally tick Center variables (subtract the mean).

  5. 05

    Run

    Click Run to see the periodogram and density chart and the Univariate Statistics table.

Worked example

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

Data

48 synthetic monthly values with no trend: a level of 45, the same December-peak seasonal pattern as the other examples and normal noise (SD 1.1) from a fixed seed.

Univariate Statistics (frequencies 1/48 to 8/48)
FrequencyPeriodPeriodogramSpectral Density Estimate
0.020848.0002.3631.732
0.041724.0000.65240.797
0.062516.0000.91441.137
0.083312.000200.32741.804
0.10429.6000.13541.988
0.12508.0004.41144.000
0.14586.8572.8594.894
0.16676.00015.0205.150

Window: Tukey-Hamming, span 5. 24 Fourier frequencies in total; the first eight are shown.

How to read it

The periodogram has one dominant spike, 200.33 at frequency 0.0833, a cycle every 12.00 months: the annual season. The Tukey-Hamming window with span 5 spreads that spike over the neighbouring frequencies, where the density stays between 40.80 and 44.00; a narrower span keeps the peak sharper but the estimate noisier.

Output tables explained

Univariate Statistics
For each Fourier frequency k/N: frequency, period, cosine and sine coefficients, periodogram I(k) = (a² + b²)·N/2 and the spectral density estimate.
Periodogram and spectral density by frequency
A line chart of both curves; the summary sentence names the frequency of the largest periodogram spike.

Assumptions and notes

  • The series is stationary; a trend or changing variance distorts the low frequencies.
  • Time points are equally spaced and complete.
  • Only Fourier frequencies k/N are evaluated, so a cycle whose length does not divide the series length is split between neighbours.

How the results are validated

On even- and odd-length reference series, the Fourier cosine and sine coefficients and the periodogram match a numpy FFT to 1e-10 and scipy.signal.periodogram to 1e-9 (allowing for scipy's halved Nyquist term). Smoothed densities for all five windows at span 5, and Tukey-Hamming at span 9, match an independent Python implementation of the SPSS window formulas to 1e-10. Validation evidence

Questions

How do I turn a frequency into a cycle length?

Period = 1 / frequency, in time points. A peak at 0.0833 on monthly data is a 12-month cycle; at 0.25 on weekly data it is a 4-week cycle.

Which window and span should I use?

Tukey-Hamming with span 5 is the SPSS default and a good start. Use a narrower span to separate close peaks and a wider one for a smoother, more stable estimate. None shows the raw periodogram.

Why is the biggest peak at the lowest frequency?

A trend looks like a very long cycle. Difference the series or remove the trend first; otherwise it hides the shorter cycles.

Why does the density peak sit next to the periodogram spike?

Smoothing spreads a single sharp spike over the frequencies inside the span, so the density can be flat or even slightly higher one or two frequencies away. Check the periodogram column, or reduce the span.

Run Spectral Analysis 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.