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

residuals.arfima

Extract the Residuals of a Fitted Object


Description

Extracts the residuals or regression residuals from a fitted arfima object

Usage

## S3 method for class 'arfima'
residuals(object, reg = FALSE, ...)

Arguments

object

A fitted arfima object

reg

Whether to extract the regression residuals instead. If TRUE, throws an error if no regression was done.

...

Optional parameters. Currently not used.

Value

A list of vectors of residuals, one for each mode.

Author(s)

JQ (Justin) Veenstra

References

Veenstra, J.Q. Persistence and Antipersistence: Theory and Software (PhD Thesis)

See Also

Examples

set.seed(8564)
sim <- arfima.sim(1000, model = list(phi = c(0.2, 0.1), dfrac = 0.4, theta = 0.9))
fit <- arfima(sim, order = c(2, 0, 1), back=TRUE)

fit

resid <- resid(fit)
par(mfrow = c(1, 3))
plot(resid[[1]])
plot(resid[[2]])
plot(resid[[3]])
fitted <- fitted(fit)
plot(fitted[[1]], resid[[1]])
plot(fitted[[2]], resid[[2]])
plot(fitted[[3]], resid[[3]])
par(mfrow = c(1, 1))

arfima

Fractional ARIMA (and Other Long Memory) Time Series Modeling

v1.7-0
MIT + file LICENSE
Authors
JQ (Justin) Veenstra [aut, cre], A.I. McLeod [aut]
Initial release
2018-11-01

We don't support your browser anymore

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