ma.pred.wge {tswge} | R Documentation |
Predictive or rolling moving average
Description
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)
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 |
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 |
Author(s)
Wayne Woodward
References
"Practical Time Series Analysis with R" by Woodward, Sadler, and Robertson"
Examples
data(wtcrude)
sm=ma.pred.wge(x=wtcrude,order=5,n.ahead=10)
[Package tswge version 2.1.0 Index]