[R] Best forecasting methods with Time Series ?

Max mnevill at exitcheck.net
Tue Dec 4 16:47:10 CET 2007


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.



More information about the R-help mailing list