Re: [R] Best forecasting methods with Time Series ?

From: Max <mnevill_at_exitcheck.net>
Date: Tue, 04 Dec 2007 07:47:10 -0800

It depends on the nature of your data. Have you used the stl function to decompose your time series data?

plot(stl(time series, s.window="periodic"))

Are you looking at the ACF and PCF to see how strong the autocorrelations are? You may need to use a differencing operator to make your series stationary? Have you considered a box jenkins transformation of your data? (taking some kind of log of your data)

Also, what is a very useful measure that I'm not quite sure how to calculate in R, (I had to copy my fits into excel and compare with my actuals) is MAPE or Mean Average Proportional Error.

The formula looks like:

 SUM for i from 1 to n absolutevalue (1/n *(Actual_i-Fit_i)/Actual_i )

If youre MAPE is below 0.2 your model should be ok for forecasting. In my experience having it below 0.05 helps make better forecasts. MAPE isn't a perfect measure (I've found some literature on improved measures,) ideally you still want the AICC low but it helps figure out on average how by much your model is off. Sometimes ARIMA models can have a high MAPE but (relatively )low AICC.

Another model that you could use if there is a trend and seasonality is Holt Winters method. It's a fairly simple model that works However, your forecasts have to stay inside the seasonal length measure for the HW method or the bounds will become rediculously large.

If I knew how state space/GARCH models worked I'd let you know. Another list to check out is gmae.comp.lang.r.r-metrics

Hope that helps,

-Max

Ozcan Asilkan wrote on 12/04/2007 :
> Hello,
>
> In order to do a future forecast based on my past Time Series data sets
> (salespricesproduct1, salespricesproduct2, etc..), I used arima() functions
> with different parameter combinations which give the smallest AIC. I also
> used auto.arima() which finds the parameters with the smallest AICs. But
> unfortuanetly I could not get satisfactory forecast() results, even
> sometimes catastrophic results which made me very disappointed.
>
> Note that, I basically use plot(forecast(auto.arima(invecTS), 24)) statement
> to construct model with arima, forecast 24 future values & plot the results.
>
> Could you suggest me better forecasting methods that I can apply in R ?
>
> Thanks, best regards..
>
> Ozcan
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 04 Dec 2007 - 16:09:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 04 Dec 2007 - 16:30:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.