test of seasonality

I want to test if my series is seasonal, here pacf and the series I'm working on monthly data. is there a test under R seasonality?

• Post your data. – Tom Reilly Jan 16 '15 at 14:21
• If you had a model for you data that includes a seasonal component, it could be quite easy. For example, if you assume that (1) the data is i.i.d. but for a seasonal pattern and (2) the seasonal pattern is additive, then you could have dummy variables for each month but one would and test those variables for statistical significance. Of course, this example is too simple to be realistic in most cases. – Richard Hardy Jan 16 '15 at 14:21
• in my exemple the data isn't iid, so how to prouve the existance of seasonal pattern. – A.Laila Jan 16 '15 at 14:43
• @TomReilly I recognize this series, it is the monthly series of inflation rate in the euro area. The data can be obtained from Eurostat's website or from ECB's SDW. Looking at the plot, it seems that the sample used by the OP covers the period 1997:01 to 2014:10. – javlacalle Jan 19 '15 at 10:08
• @tomReilly, my data is the monthly series of inflation rate – A.Laila Jan 26 '15 at 13:09

Any assumed filtering of the original series including taking seasonal differences may either work or possibly inject structure into the resultant series (Slutsky Effect). Consider what happens when you difference a white noise series, you create a a highly correlated resultant series. In this case seasonal dummies a possible approach in many cases proved to be of little value while a rather simple ARIMA model rendered a set of residuals free of identifiable structure . Note that with 214 values the standard error of the acf is 1/sqrt(214) or about .06 can lead to unnecessary worry about the sufficiency of a model. The Actual/Fit/Forecast is here . Note that the Actual/Cleansed plot is informative about the timing of the exceptional values which are lost to the human eye due to the strong auto-regressive structure.

The answer to your question is that the data is seasonal as the ARIMA model includes a significant AR(12) coefficient .446 . The acf plot of the original series hints that there might be seasonal structure while an acf plot of first differences would more clearly show this [-.41 for the acf(12) ]

• (+1) Nice work. By data is seasonal I understand you mean that there is a recurring pattern with duration of one year or less. If I understand correctly the output, the chosen model is ARIMA(1,1,0)(1,0,0) plus pulses with a positive seasonal AR coefficient. I think it would be hard to extract a seasonal component upon this model. This model does not generate seasonal cycles, it might capture a two-year periodic component (not sure), but with a positive seasonal AR coefficient it cannot capture a seasonal pattern as it is generally understood (i.e, with a duration of no more than a year). – javlacalle Jan 26 '15 at 21:43
• A seasonal MA may be more appropriate, the first two seasonal PACF of the differenced series are significant and only the first seasonal ACF is beyond the 95% confidence bands. – javlacalle Jan 26 '15 at 21:44
• A coefficient of .4 indicates that either an ar(1) or an ma(1) would work. Think of [1-.3333B]**-1 being identical to [1+.3333B] . Perhaps you are falling prey to the silliness of the computation of the standard deviation of the acf overstating model form. AUTOBOX leans towards the ar side when things are "ambiguous" as in this case due to possible convergence issues. – IrishStat Jan 26 '15 at 22:02
• thank u IrishStat, so for example the inflation of janv in this year, is influenced by the value of the jan of the last years, have u any explication of this correlation? – A.Laila Jan 27 '15 at 12:59
• An ARIMA model is a "poor man's regression model" . The data is suggesting that there is an omitted variable whose effect is being proxied by the previous values . – IrishStat Jan 27 '15 at 13:49

There are several tools you can use to explore the presence of seasonality. As you did, you can start by looking at the sample autocorrelation (functions stats::acf and stats::pacf). Significant autocorrelation at seasonal lags would suggest the presence of seasonality. The same would be suggested if significant peaks are observed in the periodogram at seasonal frequencies (function stats::spectrum).

You might as well test the significance of seasonal dummies as suggested by @RichardHardy.

Other possible approach is to fit the basic structural time series model and check if the variance of the seasonal component is close to zero relatively to the other parameters (function stats::StructTS and package stsm).

You may also find some relevant test statistics in the documentation of function nsdiffs in package forecast.

You must be aware of breaks that may undergo the series (some are graphically observed around year 2009). These effects may distort the interpretation of the results based on the above tools. To handle this issue you may include dummies for these effects or explore the series at different subsamples.

For the series that you show, be aware that the data are annual rates that are obtained by taking seasonal differences in the raw data, this will remove most of the seasonality (if any) so I wouldn't expect a major seasonal pattern in this series.

You may be interested in the monthly index of the harmonised consumer price index, the raw index and the seasonally adjusted series are available here.