TIMESERIES Procedure

Example 38.5 Singular Spectrum Analysis

(View the complete code for this example.)

This example illustrates the use of singular spectrum analysis with different grouping steps.

The following statements extract two additive components from the Sashelp.Air time series by using the THRESHOLDPCT= option to specify that the first component represent 80% of the variability in the series (see Output 38.5.1). The resulting groupings, which consist of the first three and remaining nine singular value components, are presented in Output 38.5.2 through Output 38.5.4.

title "SSA of AIR Data";

proc timeseries data=sashelp.air plot=ssa;
   id date interval=month;
   var air;
   ssa / length=12 THRESHOLDPCT=80;
run;

Output 38.5.1: Singular Values Plot

Singular Values Plot


Output 38.5.2: Singular Value Grouping #1 Plot

Singular Value Grouping #1 Plot


Output 38.5.3: Singular Value Grouping #2 Plot

Singular Value Grouping #2 Plot


Output 38.5.4: Singular Value Components Plot

Singular Value Components Plot


The following statements extract the first three important additive components from the Sashelp.Air time series by using the GROUPS=AUTO(3) option to apply SSA automatic grouping. The w-correlations are shown in Output 38.5.7. Large w-correlation values indicate that the procedure should select the corresponding singular value components as one group. The grouping results based on the w-correlations are shown in Output 38.5.5. The resulting groupings, which consist of the first (group 1), the second and third (group 2), and the fourth and fifth (group 3) singular value components, are presented in Output 38.5.8 through Output 38.5.11. According to Output 38.5.6, these three groups represent about 90 percent-sign of the variability in the series. Finally, Output 38.5.12 shows the summation of the groups together with the original data.

title "SSA of AIR Data";

proc timeseries data=sashelp.air print=ssa plot=ssa;
   id date interval=month;
   var air;
   ssa / length=12 GROUPS=AUTO(3);
run;

Output 38.5.5: SSA Groups

SSA of AIR Data

The TIMESERIES Procedure

SSA Groups
Group
Index
Window
Indices
11
22, 3
34, 5


Output 38.5.6: Singular Values Plot

Singular Values Plot


Output 38.5.7: W-Correlations Heat Map

W-Correlations Heat Map


Output 38.5.8: Singular Value Grouping #1 Plot

Singular Value Grouping #1 Plot


Output 38.5.9: Singular Value Grouping #2 Plot

Singular Value Grouping #2 Plot


Output 38.5.10: Singular Value Grouping #3 Plot

Singular Value Grouping #3 Plot


Output 38.5.11: Singular Value Components Plot

Singular Value Components Plot


Output 38.5.12: SSA Groups Summation Plot

SSA Groups Summation Plot


Last updated: June 19, 2025