X<- c(3,6,8,10,6,5) If I want to forecast using 3point moving average I use ma(X,3) from forecast package So this is going to give a series of smoothed average. If I want to forecast further 2 points ahead I used forecast (ma(X,3),h=2) So this forecast function doesn't use moving average method to forecast further points Rather it automatically chooses the eye model and forecasts the 2 points further. So my confusion is how do I forecast using 3 point moving average method only, as the forecast function uses ets?

  • 1
    $\begingroup$ Do you want a moving average model (a special case of ARMA model) or a rolling average (an average estimated in a rolling window)? $\endgroup$ Dec 21 '19 at 16:20
  • $\begingroup$ Rolling average in 3 sliding window, I'm talking about $\endgroup$
    – Manisha
    Dec 21 '19 at 16:21

I took your "toy example" of 6 values ...enter image description here and executed AUTOBOX ( a forecasting package that I have helped to develop ) and instructed the software to lock in a 3 period weighted average WITH equal coefficients and obtained

enter image description here and enter image description here

Following is the Actual/Fit and Forecast for 6 periodsenter image description here

Here are the 6 period out forecasts ....enter image description here using monte-carlo bootstrapping rather than presumptive normality for the residuals.

  • $\begingroup$ Thanks so much. $\endgroup$
    – Manisha
    Dec 22 '19 at 2:35
  • $\begingroup$ Please accept my answer to close the question $\endgroup$
    – IrishStat
    Dec 22 '19 at 14:19

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.