cable.ar.p.resid {bentcableAR}R Documentation

Fitted Residuals and Innovations for AR(p>0) Bent Cable

Description

This function computes the fitted residuals and fitted innovations from an AR(p>0) bent-cable regression.

Usage

cable.ar.p.resid(ar.p.fit)

Arguments

ar.p.fit

A cable.ar.p.iter object for AR(p) data, p>0.

Details

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.

Value

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.

Warnings

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.

Note

This function is intended for internal use by bentcable.ar.

Author(s)

Grace Chiu

References

See the bentcableAR package references.

See Also

cable.ar.p.diag

Examples

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 )

[Package bentcableAR version 0.3.1 Index]