powered by
Calculate the Centred Moving Average (CMA) for time series.
cmav( y, ma = NULL, fill = c(TRUE, FALSE), outplot = c(FALSE, TRUE), fast = c(TRUE, FALSE) )
Centred moving average. If y is a ts object, then cma has the same properties.
input time series. Can be ts or msts object.
ts
msts
length of centred moving average. If y is a ts object then the default is its frequency. If it is a msts object the default is the maximum frequency.
y
if TRUE, then fill first and last ma/2 observations using exponential smoothing.
TRUE
if TRUE, then output a plot of the time series and the moving average.
if TRUE, then only a limited set of models are evaluated for CMA extrapolation.
Nikolaos Kourentzes, nikolaos@kourentzes.com.
Ord K., Fildes R., Kourentzes N. (2017) Principles of Business Forecasting, 2e. Wessex Press Publishing Co., p.109.
cmav(referrals,outplot=TRUE)
Run the code above in your browser using DataLab