ma.pred.wge | R Documentation |
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.
ma.pred.wge(x,order=3,n.ahead=1,plot=TRUE)
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 |
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 |
Wayne Woodward
"Practical Time Series Analysis with R" by Woodward, Sadler, and Robertson"
data(wtcrude)
sm=ma.pred.wge(x=wtcrude,order=5,n.ahead=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.