ma {forecast} | R Documentation |
Computes a simple moving average smoother.
ma(x, order, centre=TRUE)
x |
Univariate time series |
order |
Order of moving average smoother |
centre |
If TRUE, then the moving average is centred. |
Numerical time series object containing the smoothed values.
Rob J Hyndman
plot(wineind) sm <- ma(wineind,order=12) lines(sm,col="red")