I have a monthly serie of the importation of apples. As I constructed the Buys-Ballot table, I found out that the serie is seasonal, in March for four years and in April for the later three years. What to do to deseasonal it since the seasonal month has changed??
2 Answers
You can seasonal adjust the data with X-13ARIMA-SEATS. X-13ARIMA-SEATS is a pretty powerful tool and deals with changing seasonal patterns. You can get the X-13ARIMA-SEATS fortan libraries from the US Census Bureau here, but most statistical software include a wrapper around the X-13ARIMA-SEATS program. It should be fairly easy to implement.
If you suspect the month has changed, and you know the change is in year 4, then you can add the month dummies Richard suggested. You will do a better job by adding interaction terms also, i.e. regress the seasonal variable on month dummies (denoted i.month) and interaction terms (A x i.month) and (B x i.month) where A = 1 if year <= 4, 0 otherwise, and B = 1 if year > 4, 0 otherwise. That way you will capture the shift in the seasonality.
seasonplot
from the "forecast" package in R. Extra to that, you could also include some numerical measures of seasonality if you have obtained any so far. $\endgroup$