The rolling average method is mostly used to produce a smoothed series by removing noise. For ex- 3 window moving average, in general practice, the output for the fourth period is the 3 window moving average of first 3 periods. So in this process we forecast one step ahead by taking average of 3 points. But in moving average, ma function in R basically produces a smoothed series of the original series. So if if have data points from Jan to Dec 2019, then my moving average series has data points from Feb 2019 to Nov 2019. So In this case, how do I forecast for Dec 2019. By using forecast function, it produces ets model, which I don't want.


A weighted average is what an ARIMA model is Seeking certain type of ARIMA explanation . It is the answer to ...the double question ...1) how many values should I include AND 2) how do I weight/leverage them in order to get a "representative value".

Thus it is BOTH a smoother and a forecaster ..

When you specify a 3 period equally-weighted average for either smoothing or forecasting ...you are specifying an arima model (3,0,0)(0,0,0) with coefficients = 1/3 , 1/3 and 1/3 WITHOUT a constant. Obviously one might specify a 3 period weighted aveage where the weights are optimized ... as is often the case.

What you may be looking for is a way for your software to determine both "how many" and "how important" the previous values are and not just assume some form of a model like ets.

Also see Identifying Early Indicators Time Series Analysis for an example of a 3 period autoregressive ( really 3 period moving average in common parlance ) in practice.

One final distinction is that smoothing "centers" the result by using the value 1 period before , the current value and the value 1 period in the future period after the current period whereas forecasting uses the value 3 periods before , 2 periods before and 1 period before to predict the next value.

  • $\begingroup$ so below is my data: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec 2018 59 65 70 83 62 98 63 95 57 2019 57 69 75 80 67 85 79 82 110 considering 3-period moving average for period Apr, May, Jun 2018 the average is 64.66, I want this average to be the forecast value of July 2018. Please let me know if we have an inbuilt function in R to do so. Thanks $\endgroup$
    – Manisha
    Dec 26 '19 at 5:28
  • $\begingroup$ Your data suggests that you only have 9 months of data for 2018 ....59 65 70 83 62 98 63 95 57 ... is that correct ? if not fill in the last 3 months of 2018 . $\endgroup$
    – IrishStat
    Dec 26 '19 at 10:31

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.