Innovation Residuals in AR
Obtains the residuals (estimated innovations). The residuals for t=1,...,p are obtained using the backforecasting algorithm of Box and Jenkins (1970).
BackcastResidualsAR(y, phi, Q = 100, demean=TRUE)
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 |
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).
Vector of residuals
No check is done that the AR is causal-stationary.
A.I. McLeod and Y. Zhang
Box and Jenkins (1970). Time Series Analysis: Forecasting and Control.
#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)))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.