1 Getting Started with X-12-ARIMA Diagnostics — Spectral Diagnostics Catherine C.H. Hood, Catherine Hood Consulting Anyone can analyze any time series from two different points of view: time and frequency. The two approaches are complementary, giving us different views of the same time series. To analyze a series in the frequency domain, we measure the strength of the different frequencies in decibels. The graph of the frequencies versus the decibels is called the periodogram or the spectrum, or as an adjective, spectral graphs. Spectral analysis allows us to see the relationships between the frequencies. For monthly series with a significant seasonal component, the amplitudes that dominate are at frequencies of 1/12, 2/12, 3/12, 4/12, 5/12, and 6/12. If something happens regularly every year, then we see 1/12 of that cycle every month, and we will see a spike in the spectral plot at 1/12. Similarly, if something happens regularly every 6 months, then we see 1/6 of the cycle every month, and we will see a spike at 1/6 or 2/12. If something happens regularly every 3 months, then you will see a spike at 1/3 or 4/12, and so on. For a quarterly series with a significant seasonal component, the amplitudes that dominate are amplitudes associated with components that repeat every year (i.e., four quarters) or every two quarters. So for seasonal series, we will see peaks at the frequencies associated with 1/4 cycle per quarter and at 2/4 cycle per quarter. Also on the graph are frequencies for the trading day effect—the effect that comes from the weekday composition of the month. For example, if some retail sales series has very high sales on Friday and Saturday, and in a given month there were five Fridays and five Saturdays instead of four, then there would be increased sales that month because of the weekday composition of the month. The trading day frequencies were identified by Cleveland and Devlin (1980). For monthly flow (i.e., non-inventory) series, the most prominent trading day frequency is at 0.348. Another common frequency for series with trading day is at 0.432. Before the spectrum is computed, we need a detrended series or the trend dominates the spectral graph and it is difficult to see anything else in the graph. X-12-ARIMA (U.S. Census Bureau, 2009), or X-12 for short, will use either a differenced series or the series detrended by the filters in X-12. If we use a log transformation for the series, then X-12 will use the detrended, transformed series. Spectral Graphs in X-12 X-12 estimates several different spectral graphs: the spectrum of the original series, the spectrum of the seasonally adjusted series, and the spectrum of the irregular. Optionally, X-12 will also estimate the spectrum of the ARIMA model residuals. To look for seasonality in the original series, we look at the spectrum of the differenced original series in Table G 0. If you are seasonally adjusting the series, and X-12 doesn’t see any peaks in the original series, then you will get a warning from X-12 that the series should not be a candidate for seasonal adjustment. Conversely, if you are not asking for a seasonal adjustment, and X-12 flags seasonal peaks in the original series, then you will get a warning message that the series is seasonal and should be adjusted. To look for residual seasonal or trading day effects in the seasonally adjusted series, we look at the spectral plots for the seasonally adjusted series (Table G1) and the irregular component (Table G2). Because residual seasonality is an important problem, X-12 sends warnings about spectral peaks in the seasonally adjusted series and the irregular to the screen and the error file. You may notice in the heading of the graph that the spectrum is for the seasonally adjusted series has been detrended and modified for extreme values. This is also true for the irregular spectrum. (Therefore, the spectral graphs are computed from Tables E2 and E3.) 2 The spectrum of the residuals from the regARIMA model can help us see residual seasonality or trading day effects in the regARIMA model. This spectral graph is found with the other model diagnostics toward the beginning of the output file. “Visually Significant” Spectral Peaks The rules for whether or not a peak is flagged as “visually significant” are somewhat complicated. First, the value at the seasonal and/or trading day frequencies must be six stars or asterisks higher than either neighboring frequency in the plot found in the output file of X-12. (To make the plot, the range of the frequencies is divided into 52 parts, so each asterisk in the plot equals 1/52nd of the range.) Second, besides the six-star rule, a seasonal or trading day peak also must be higher than the median of the frequencies in the graph in order for X-12 to flag the frequency as a peak. For more information on how spectrum peaks are flagged, see Soukup and Findley (1999). In practice, the higher the peak is above its neighbors, the more important the peak. Also, if the peak is the dominant peak in the graph, you may also have some cause for concern. Conversely, if you have a peak, even if it is six stars high, but it appears to be on the level of the noise in the spectrum, then it might be just noise. Spectrum diagnostics work best with medium-length series. If we get too many observations, especially in economic time series, the series has the potential to change too much. If the seasonality is changing, we also don’t get a good estimate of the spectrum at the various frequencies. By default, the spectrum is computed for eight years before the end of the span for monthly series and the entire series for quarterly series. This can be one reason why the spectrum diagnostics may disagree with the other diagnostics for the presence of seasonality in the original, unadjusted series. Let’s look at an example of a spectrum graph for a monthly series. On the next page is a spectral graph from X-12 of an original (unadjusted) series. The seasonal frequencies are marked with an “S” and the trading day frequencies with a “T”. The left of the graph is the lower frequencies, so the first “S” marks 1/12, the seasonal frequency for annual cycles. The second “S” marks 2/12, and so on. The left-most frequency marked with a “T” is the frequency at 0.348. Notice that the original series in Example 1 shows signs of very strong seasonality. The peak at 1/12 is 11 asterisks taller than its taller nearest neighbor which makes it “visually significant.” There are also seasonal peaks at the frequencies 2/12, 3/12, and 5/12 cycles per month. (There is not a peak at 4/12. That peak is shorter than its nearest neighbor. This, however, is not a cause for concern if we want to seasonally adjust this series because the series still shows strong seasonality.) The series in Example 2 is not seasonal. The only peak at a seasonal frequency is at 5/12, but it is not visually significant because it is only three asterisks taller than its nearest neighbors. In Example 3, we can see the spectral graph for the seasonally adjusted series that corresponds to the spectrum of the first series shown in Example 3. Notice that after seasonal adjustment, the seasonal frequencies have all been suppressed. Residual seasonality in the seasonally adjusted series, the irregular, or the regARIMA model residuals can often be eliminated by either shortening the span of the data used for modeling or for the adjustment, changing the seasonal filter lengths, or both. 3 Example 1 — Spectrum of the original series for a series with strong seasonality G.0 10*LOG(SPECTRUM) of the differenced, transformed Original Data (Table A1 or B1). Spectrum estimated from 1995.Jan to 2002.Dec. ++++++++++I+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++I -5.81I * I -5.81 I S I I S I I S I -8.20I S * I -8.20 I S * S I I S S S I I S S S I -10.58I S S S I -10.58 I S S S I I S S S I I S S S I -12.97I S S S I -12.97 I S S S I I S S * S I I * S S * S I -15.36I S S S * S I -15.36 I S S S ** S I I S S S S* S I I S S S S* S* I -17.74I S S S S* S* I -17.74 I S *S S S** *S* I I S *S S S*T *S* I I* S *S S S*T *S* I -20.13I* S *S S S*T *S* I -20.13 I* S *S* S S*T *S* I I* *S *S* S *S*T* *S* I I* *S *S* S *S*T** *S* I -22.52I* *S *S* S* *S*T** *S* I -22.52 I* *S *S* S* *S*T*** *S** I I* * *S *S* S* *S*T*** *S*T I I* * *S **S* *S* **S*T*** **S*T I -24.90I** ** *S* **S* *S* **S*T**** **S*T I -24.90 I** *****S* **S* *S* ***S*T**** **S*T I I** *****S* **S* *S* ***S*T*******S*T I I** *****S* **S** *S* ****S*T*******S*T I -27.29I** *****S* **S** *S** *****S*T*******S*T I -27.29 I** ******S* ***S** *S** ******S*T*******S*T* I I*** ******S* ***S** *S*********S*T*******S*T* * I I*** ******S** ***S** **S*********S*T*******S*T* * I -29.67I**********S** ***S*** **S*********S*T*******S*T* * I -29.67 I**********S** ****S*** **S*********S*T*******S*T* ** I I**********S*** ****S**** ***S*********S*T*******S*T* ** I I**********S*** *****S*********S*********S*T*******S*T** ** I -32.06I**********S*********S*********S*********S*T*******S*T***** I -32.06 I**********S*********S*********S*********S*T*******S*T****** I I**********S*********S*********S*********S*T*******S*T****** I I**********S*********S*********S*********S*T*******S*T****** I -34.45I**********S*********S*********S*********S*T*******S*T****** I -34.45 I**********S*********S*********S*********S*T*******S*T****** I I**********S*********S*********S*********S*T*******S*T****** I I**********S*********S*********S*********S*T*******S*T******* I -36.83I**********S*********S*********S*********S*T*******S*T********I -36.83 ++++++++++I+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++I S=SEASONAL FREQUENCIES, T=TRADING DAY FREQUENCIES 4 Example 2 — Spectrum of the original series for a series with no seasonality G.0 10*LOG(SPECTRUM) of the differenced, transformed Original Data (Table A1 or B1). Spectrum estimated from 1995.Jan to 2002.Dec. ++++++++++I+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++I -7.05I * I -7.05 I * I I * I I * * I -9.07I * * * I -9.07 I * * * * I I * * S * I I * * S * I -11.09I * * S** ** I -11.09 I * * * S*T ** I I * * * * *S*T ** I I * ** ** ***S*T *** I -13.11I * ** *** ***S*T* ****I -13.11 I * ** ** T** ****S*T* ***SI I * S* *** T** ****S*T* ***SI I * S* **S T*******S*T* ***SI -15.13I * * S* ** **S T*******S*T** ***SI -15.13 I * * S* ** **S*T*******S*T** ***SI I ** * S* ** **S*T*******S*T*******SI I ** * S** ** **S*T*******S*T*******SI -17.15I ** ** S***** ***S*T*******S*T*******SI -17.15 I ** *** S*********S*T*******S*T*******SI I *** *** S*********S*T*******S*T*******SI I ***S *** S*********S*T*******S*T*******SI -19.17I ***S *** S*********S*T*******S*T*******SI -19.17 I *******S *** *S*********S*T*******S*T*******SI I ********S **** *S*********S*T*******S*T*******SI I ** ********S* ***** *S*********S*T*******S*T*******SI -21.18I ** ********S******* *S*********S*T*******S*T*******SI -21.18 I ** *********S*********S*********S*T*******S*T*******SI I * ** *********S*********S*********S*T*******S*T*******SI I ** ** *********S*********S*********S*T*******S*T*******SI -23.20I ** *************S*********S*********S*T*******S*T*******SI -23.20 I ** ****S*********S*********S*********S*T*******S*T*******SI I ** ****S*********S*********S*********S*T*******S*T*******SI I *******S*********S*********S*********S*T*******S*T*******SI -25.22I *******S*********S*********S*********S*T*******S*T*******SI -25.22 I *******S*********S*********S*********S*T*******S*T*******SI I *******S*********S*********S*********S*T*******S*T*******SI I *******S*********S*********S*********S*T*******S*T*******SI -27.24I *******S*********S*********S*********S*T*******S*T*******SI -27.24 I *******S*********S*********S*********S*T*******S*T*******SI I *******S*********S*********S*********S*T*******S*T*******SI I *******S*********S*********S*********S*T*******S*T*******SI -29.26I ********S*********S*********S*********S*T*******S*T*******SI -29.26 I ********S*********S*********S*********S*T*******S*T*******SI I ********S*********S*********S*********S*T*******S*T*******SI I ********S*********S*********S*********S*T*******S*T*******SI -31.28I ********S*********S*********S*********S*T*******S*T*******SI -31.28 I ********S*********S*********S*********S*T*******S*T*******SI I *********S*********S*********S*********S*T*******S*T*******SI I *********S*********S*********S*********S*T*******S*T*******SI -33.30I**********S*********S*********S*********S*T*******S*T*******SI -33.30 ++++++++++I+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++I S=SEASONAL FREQUENCIES, T=TRADING DAY FREQUENCIES 5 Example 3 — Spectrum of the seasonally adjusted series (corresponding to the series in Example 1) G.1 10*LOG(SPECTRUM) of the differenced, transformed seasonally adjusted data (Table E2). Spectrum estimated from 1995.Jan to 2002.Dec. ++++++++++I+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++I -24.35I* I -24.35 I* I I* I I* I -25.99I* I -25.99 I** I I** * I I** * * I -27.63I** * * I -27.63 I** * * * I I** * * * * I I** * * ** * * I -29.27I*** ** * * ** * * I -29.27 I*** ** * * ** ** * I I*** ** * * ** ** * I I*** ** * * ** ** ** I -30.91I*** ** * * * ** ** ** I -30.91 I******* ** * * ** ** * ** I I******* ** * * ***** * *** I I******* ** * * ** ***** ***** I -32.55I******* ** * * ** ***** ***** I -32.55 I******* ** ** * ** ** ***** ***** I I******** ** ** ** ** ** ****** ***** I I******** ** ***** *** ** ****** ***** I -34.19I******** ** * ***** *** ** ****** ****** I -34.19 I******** ** * ***** *** ** ****** ****** I I******** ** * ***** *** ** ****** ****** I I******** ** * ***** *** ** ****** ******* I -35.83I******** ** ** ***** *** *** ****** ******* I -35.83 I******** ** ** ***** ******* ******** ******* I I********* ** ** ***** ******* T******* ******** I I********* *** ** ***** ******* T******* T********I -37.47I********* **** ** ***** ******* T*********T*******SI -37.47 I********* **** ** ***** ******** T*******S*T*******SI I********* **** ** ***** ******** T*******S*T*******SI I********** ******* ***** ********* T*******S*T*******SI -39.11I****************** ****** ********* T*******S*T*******SI -39.11 I**********S******* ****** ********* *T*******S*T*******SI I**********S******* ****** ***********T*******S*T*******SI I**********S******* ******* *********S*T*******S*T*******SI -40.75I**********S******* ******* **********S*T*******S*T*******SI -40.75 I**********S******** ********S*********S*T*******S*T*******SI I**********S******** ********S*********S*T*******S*T*******SI I**********S******** ********S*********S*T*******S*T*******SI -42.40I**********S******** ********S*********S*T*******S*T*******SI -42.40 I**********S******** ********S*********S*T*******S*T*******SI I**********S******** ********S*********S*T*******S*T*******SI I**********S******** ********S*********S*T*******S*T*******SI -44.04I**********S******** ********S*********S*T*******S*T*******SI -44.04 I**********S******** *********S*********S*T*******S*T*******SI I**********S********* *********S*********S*T*******S*T*******SI I**********S********* *********S*********S*T*******S*T*******SI -45.68I**********S*******************S*********S*T*******S*T*******SI -45.68 ++++++++++I+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++I S=SEASONAL FREQUENCIES, T=TRADING DAY FREQUENCIES 6 Acknowledgements The author is extremely grateful to Kathleen McDonald-Johnson, Roxanne Feldpausch, David Findley, and Brian Monsell for reviewing earlier versions of this document. Trademarks and Copyrights X-12-ARIMA is a product of the U.S. Census Bureau and is available free of charge. Disclaimer There is no warranty with regard to the information provided above, and Catherine Hood Consulting assumes no responsibility for any damage resulting from any use of any methods, products, instructions, or ideas contained in this paper. References Soukup, R.J. and D.F. Findley (1999), “On the Spectrum Diagnostics Used by X-12-ARIMA to Indicate the Presence of Trading Day Effects after Modeling or Adjustment,” Proceedings of the Business and Economics Section, Alexandria, VA: American Statistical Association. (http://www.census.gov/ts/papers/rr9903s.pdf) U.S. Census Bureau (2009), X-12-ARIMA Reference Manual, Version 0.3, Washington, DC: U.S. Census Bureau, U.S. Department of Commerce. http://www.census.gov/ts/x12a/v03/x12adocV03.pdf
© Copyright 2026 Paperzz