Over a million developers have joined DZone.

The R Language and Flat Forecasts

· Big Data Zone

Read this eGuide to discover the fundamental differences between iPaaS and dPaaS and how the innovative approach of dPaaS gets to the heart of today’s most pressing integration problems, brought to you in partnership with Liaison.

About once a week some­one will tell me there is a bug in my fore­cast pack­age for R because it gives fore­casts that are the same for all future hori­zons. To save answer­ing the same ques­tion repeat­edly, here is my response.

A point fore­cast is (usu­ally) the mean of the dis­tri­b­u­tion of a future obser­va­tion in the time series, con­di­tional on the past obser­va­tions of the time series. It is pos­si­ble, even likely in some cir­cum­stances, that the future obser­va­tions will have the same mean and then the fore­cast func­tion is flat.

  • A ran­dom walk model will return a flat fore­cast func­tion (equal to the last observed value of the series).
  • An ETS(A,N,N) model will return a flat fore­cast function.
  • An iid model will return a flat fore­cast func­tion (equal to the mean of the observed data).

This is not a bug. It is telling you some­thing about the time series — namely that there is no trend, no sea­son­al­ity, and insuf­fi­cient tem­po­ral dynam­ics to allow the future obser­va­tions to have dif­fer­ent con­di­tional means.

I dis­cussed this once with another con­sul­tant and he told me that he some­times adds some ran­dom noise to his fore­casts, just to stop his clients ques­tion­ing the flat fore­cast func­tions. Unfor­tu­nately, that increases the fore­cast error, but he thought it was bet­ter to give them what they wanted rather than what was best!



Discover the unprecedented possibilities and challenges, created by today’s fast paced data climate and why your current integration solution is not enough, brought to you in partnership with Liaison


Published at DZone with permission of Rob J Hyndman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}