I'm following the procedure in this post (Adjusting daily time series data for the seasonal component) on R 3.2.3 (linux).

The de-seasoning process in the above post works fine. But with my data, a weather time series with 32,000+ observations, the same process leaves behind a noticeable seasonal trend, as shown below.

> ZI_Index <- ts(ZI_FINAL$ZI, start = c(1926,1,1), frequency = 365.25)
> ZI_Trends <- stl(ZI_Index, s.window = "periodic")
> plot(ZI_Trends)

Trends in original time series

> ZI_Detrend <- ZI_Trends$time.series[,"remainder"]
> monthplot(ZI_Detrend)

Monthplot of residuals

> ZI_Detrend_Trends <- stl(ZI_Detrend, s.window = "periodic")
> plot(ZI_Detrend_Trends)

Trends in remainder of the original time series


Perhaps you need some sort of hybrid model incorporating memory as well as dummy variables. You might want to look at R Time Series Forecasting: Questions regarding my output although weather data is not impacted by holidays/day-of-the week etc.. Previous day's weather is often a good forecaster for today's weather.


Remained a sine component of a longer period than the seasonal feature you extracted earlier. Adjust the parameters and perform a new extraction and you will see it disappear.


We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.