Learn R Programming

tswge (version 2.1.0)

fore.arima.wge: Function for forecasting from known model which may have (1-B)^d and/or seasonal factors

Description

This function calculates forecasts from a known model that may have stationary ARMA components as well as (1-B)^dand/or seasonal factors

Usage

fore.arima.wge(x,phi=0,theta=0,d=0,s=0,n.ahead=5,lastn=FALSE,plot=TRUE,alpha=.05,limits)

Value

f

Vector of forecasts

ll

Lower limits

ul

Upper limits

resid

Residuals

wnv

White noise variance estimate

xbar

Sample mean of data in x

se

Se for each forecast

psi

Psi weights

ptot

Total order of all AR components, phi, d, and s

phtot

Coefficients after multiplying all stationary and nonstationary coponents on the AR side of the equation

Arguments

x

Realization to be forecast from

phi

Vector containing stationary AR parameters

theta

Vector containing MA parameters

d

Order of difference

s

Seasonal order

n.ahead

Number of steps ahead to forecast

lastn

Logical, lastn=TRUE plots forecasts for the last n.ahead values in the realization

plot

Logical, plot=TRUE plots forecasts

alpha

Significance level for prediction limits

limits

Logical, limits=TRUE plots prediction limits

Author

Wayne Woodward

References

"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott

Examples

Run this code
data(airline)
          x=log(airline)
          phi12=c(-.36,-.05,-.14,-.11,.04,.09,-.02,.02,.17,.03,-.1,-.38)
          s=12
          d=1
          fore.arima.wge(x,phi=phi12,d=1,s=12,n.ahead=12,limits=FALSE)

Run the code above in your browser using DataLab