Given a time series in the vector x and order (either an odd or even integer) ma.pred.wge computes a predictive moving average giving 1-step ahead predictions through x(n+1). Optionally, you can specify k-step ahead forecasts beyond the end of the data.
Usage
ma.pred.wge(x,order=3,n.ahead=1,plot=TRUE)
Value
x
Original data
pred
Data file showing 1-step ahead predictors up to x(k.ahead)
order
Order (odd or even integer) of the moving average predictor
Arguments
x
Vector containing original realization
order
Order (odd or even integer) of moving average predictor (default=3)
n.ahead
Number of steps ahead to forecast beyond the end of the data (default=1)
plot
If plot=TRUE then plots of the data and moving average predictors are plotted
Author
Wayne Woodward
References
"Practical Time Series Analysis with R" by Woodward, Sadler, and Robertson"