cable.ar.p.resid {bentcableAR} | R Documentation |
This function computes the fitted residuals and fitted innovations from an AR(p>0) bent-cable regression.
cable.ar.p.resid(ar.p.fit)
ar.p.fit |
A |
Fitted residuals correspond to the detrended time series, where the fitted bent cable is subtracted from the data. They retain the autocorrelation structure of the response time series.
Fitted innovations are the estimated residual noise after adjusting for the AR(p) structure, and should be approximately independent if the AR(p) fit successfully captures the actual autocorrelation in the data.
Both types of errors may be used for model diagnosis.
resid |
A numeric vector of fitted residuals; it has the same length as the response data. |
innov |
A numeric vector of fitted innovations; the first value in the vector corresponds to the (p+1)st time point. |
This function fails if ar.p.fit
is from a non-AR(p>0) fit.
The fitted innovations are only meaningful if ar.p.fit
is
associated with equidistant time points with unit increments.
This function is intended for internal use by bentcable.ar
.
Grace Chiu
See the bentcableAR
package references.
data(sockeye) fit.ar2 <- cable.ar.p.iter( c(13,.1,-.5,11,4,.5,-.5), sockeye$logReturns, tol=1e-4 ) cable.ar.p.resid( fit.ar2 )