How do I run a Spectral analysis?
An Excel sheet with both the data and results can be downloaded by clicking here. The data have been obtained in [Anderson, T.W. (1971). The Statistical Analysis of Time Series. John Wiley & Sons, New York], and correspond to activity data of the sun. Our goal is to determine if cycles characterize this activity by using Spectral analysis, a method that is based on the Fourier transform. The time series is composed by 176 data covering years 1749 to 1924.

After opening XLSTAT, select the XLSTAT/XLSTAT-Time/Spectral analysis command, or click on the corresponding button of the "XLSTAT-Time" toolbar (see below).

Once you've clicked on the button, the Spectral analysis dialog box will appear. Select the data on the Excel sheet. The "Variable to analyze" corresponds to the series of interest, the sunspot data. The "Time variable" corresponds to the years. When you click the "More" button, the lower part of the dialog box appears. For the spectral density, we choose to use fixed weights. We need to select the weights on the Excel sheet. The estimate of the spectral density corresponds to the smoothing of the periodogram, and it is often a better estimator of the real spectral density of the observed phenomenon. The option "Column labels" is activated because the first row of the selected data contains the header of the variable.

The computations begin once you have clicked on "OK". The results will then be displayed. The first table displays results of the white noise tests. These tests allow to test if the time series can be considered as a white noise or not. In our case, it clearly appears, when looking at the p-values, that the series if significantly different from a white noise at a significance level of 0.05.

The next results table is used to build the two charts of the periodogram and the spectral density. The two charts are represented on both the frequencies scale (varying between 0 and p), and on the period scale which unit is identical to the Time variable. Hereunder are displayed the charts on the period scale.


We notice that the smoothing is efficient as the chart of the spectral density is smoother than the chart of the periodogram. In order to analyze the peak of the spectral density, we have modified the scale of the abscissa axis.

We notice that the peak corresponds to a period of 11 years. That means that the activity of the sun varies with quite regular cycles of 11 years.
Click here for other tutorials.