The Periodogram: Two Examples 1. Consider the monthly fruit import series we have studied previously. We'll start with the raw (unsmoothed periodogram). By default, spec.pgram will remove the trend in the data by remove a least squares line from each component of the series. If removing the trend, spec.pgram also removes the mean from the series. spec.pgram does not plot the power, but the power transformed to decibels: 10 * log_(10)(power). > tsplot(fruitimp.ts) > spec.pgram(fruitimp.ts, plot=T) This plot suggests there are important periods every year, every 6 months and every 3 months (freq = 1, 2 and 4). However, the plot is pretty rough. Let's smooth the periodogram using the "spans" option. This option contains a sequence of 1 or more odd numbers. The larger the numbers, the smoother the plot. > spec.pgram(fruitimp.ts, plot=T, spans=c(5,9)) You'll notice a cross in the upper right corner. Its vertical component indicates the 95% confidence interval for the spectrum (based on a chi-squared approximation) and its horizontal element indicates the bandwidth of the estimate. The more smoothing you do, the larger the bandwidth is. 2. Monthly data on the Southern Oscillation Index (SOI), which is the difference in the monthly averages of air pressure at Darwin, Australia and Tahiti, French Polynesia. It is related to the important atmospheric phenomenon called El Nino, or the El Nino Southern Oscillation (ENSO). > tsplot(soi.ts.1965) There doesn't appear to be a trend to remove, but we'll subtract the mean and construct a smooth periodogram: > x <- spec.pgram(soi.ts.1965,detrend=F,demean=T,plot=T,span=c(3,5,7)) This peak at 1 shows the yearly seasonal frequency. There also seems to be important information at a smaller frequencies. Let's look at the output of spec.pgram (saved in x) to get an idea: > x$spec[1:20] # List of spectral estimates at 1st 20 freq. [1] 2.6619747 2.5720544 2.3626528 2.1940396 2.1866534 2.3298504 2.6087809 [8] 2.9663661 3.2607577 3.3986664 3.3566799 3.1764352 2.9395163 2.7222266 [15] 2.5720816 2.4214487 2.1676178 1.7675998 1.1596363 0.3207383 > x$freq[10] # Freqency corresponding to estimate of 3.39 above [1] 0.2307692 So the period = 12/.23 = 52.17 months (4.3 years), which probably reflects the general El Nino period. Can we see these periods in the sample ACF plot?