Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

BackcastResidualsAR

Innovation Residuals in AR


Description

Obtains the residuals (estimated innovations). The residuals for t=1,...,p are obtained using the backforecasting algorithm of Box and Jenkins (1970).

Usage

BackcastResidualsAR(y, phi, Q = 100, demean=TRUE)

Arguments

y

a time series or vector

phi

AR coefficients, lags 1,...,p

Q

for backcasting, the AR is approximated by an MA(Q)

demean

subtract sample mean

Details

The backforecasting algorithm is described in detail in the book of Box and Jenkins (1970). The idea is to compute the expected value of the innovation assuming a high-order MA(q).

Value

Vector of residuals

Note

No check is done that the AR is causal-stationary.

Author(s)

A.I. McLeod and Y. Zhang

References

Box and Jenkins (1970). Time Series Analysis: Forecasting and Control.

See Also

Examples

#compare residuals obtained using backcasting with fitted parameters and
# the residuals extracted from output of FitAR.  They are identical.
p<-11
out<-FitAR(log(lynx), p)
phi<-out$phiHat #fitted parameters
resphi<-BackcastResidualsAR(log(lynx), phi)
sum(abs(resphi-resid(out)))

FitAR

Subset AR Model Fitting

v1.94
GPL (>= 2)
Authors
A.I. McLeod, Ying Zhang and Changjiang Xu
Initial release
2013-03-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.