TIMESERIES Procedure
Example 38.4 Illustration of Spectral Analysis
(View the complete code for this example.)
This example illustrates the use of spectral analysis.
The following statements perform a spectral analysis on the SUNSPOT data set. The periodogram is displayed as a function of the period and frequency in Output 38.4.1. The estimated spectral density together with its 50% confidence limits is displayed in Output 38.4.2.
title "Wolfer's Sunspot Data";
proc timeseries data=sunspot plot=(series periodogram spectrum);
var wolfer;
id year interval=year;
spectra freq period p s / adjmean bart c=1.5 expon=0.2;
run;
Output 38.4.1: Periodogram

Output 38.4.2: Spectral Density Plot

Last updated: June 19, 2025