1
$\begingroup$

I want to understand how forecast from STL function in R works. So, I am not giving any reproducible code here.

Below is the procedure that I worked on time series

  1. I used STL decomposition on my time series.

  2. Checked residuals component from step 1 for white noise using Box.test

  3. Found that residuals are not white-noise. So, used ARIMA model to fit a forecasting model.

Now, my task is to compute forecast values that consist of a. Seasonal and Trend component from step 1 above b. Residuals component from ARIMA model - from step 3 above.

If I use

forecast(stl(..)), 

it gives me

 Point Forecast     Lo 80    Hi 80    Lo 95    Hi 95 

However, I am interested in only seasonal and trend parts of forecast. How can I get seasonal trend components?

What components does constitute forecast(stl(..))

$\endgroup$
  • $\begingroup$ As far as I know, the function forecast::forecast.stl does not return forecasts for each component. According to the documentation, the forecasts are based on the seasonally adjusted data and then are re-seasonalized using the last year of the seasonal component. As an alternative approach, you may be interested in this post, which describes how to obtain forecasts for the trend and seasonal components, as well as for the overall series, based on the basic structural time series model. $\endgroup$ – javlacalle Nov 30 '14 at 23:00
  • $\begingroup$ @javlacalle, Thank you for replying. On my timeseries, fit methods are running forever. Can I share my data with you to check? pls let me know $\endgroup$ – Chandra Dec 1 '14 at 20:25
  • $\begingroup$ Feel free to post the data or email me the file and I will have a look. $\endgroup$ – javlacalle Dec 1 '14 at 20:56
  • $\begingroup$ @javlacalle, Thank you for extending help. I sent email to your yahoo.es account $\endgroup$ – Chandra Dec 1 '14 at 21:09

Your Answer

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

Browse other questions tagged or ask your own question.