methods.arrob: S3 Methods for Robustly Fitted Autoregressive Models

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Methods for objects of class "arrob" as it is returned by a call to the function arrob. There are methods to extract (robustly filtered) residuals, fitted values or the robustly filtered observations themselves. There is also a method for (robust) prediction.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## S3 method for class 'arrob'
residuals(object, x = object$x,
                method = c("recursive", "statespace", "nonrobust"),
                na.action = na.fail, ...)

## S3 method for class 'arrob'
fitted(object, x = object$x,
             method = c("recursive", "statespace", "nonrobust"),
             na.action = na.fail, ...)

filtered(object, ...)
## S3 method for class 'arrob'
filtered(object, x = object$x,
               method = c("recursive", "statespace", "nonrobust"), na.action, ...)

## S3 method for class 'arrob'
predict(object, newdata, n.ahead = 1, se.fit = TRUE,
              method = c("recursive", "statespace", "nonrobust"), ...)

Arguments

object

an object of class "arrob".

x

numeric vector of a univariate time series.

method

character string denoting the robust filtering method to be used, see Details.

newdata

numeric vector of a univariate time series of which future values sould be predicted.

n.ahead

integer value giving the number of steps ahead at which to predict.

se.fit

logical value. Should the estimated standard errors of the prediction be returned?

na.action

function to be called to handle missing values.

...

additional arguments passed to the function filterrob.

Details

If method = "recursive" or method = "statespace", the observations in argument x (respectively newdata) are robustly filtered. See the function filterrob for details.

Value

Numeric vector of residuals, fitted values or filtered observations.

For predict.arrob, a time series of predictions, or if se.fit = TRUE, a list with components pred, the predictions, and se, the estimated standard errors.

Author(s)

Alexander Dürre and Tobias Liboschik

References

Maronna, R. A., Martin, R. D., and Yohai, V. J. (2006): Robust Statistics: Theory and Methods, Wiley, chapter 8, doi: 10.1002/0470010940.

See Also

Robust fitting of autoregressive models with arrob.

Plotting method plot.arrob for fitted autoregressive models.

Examples

1
2
3
4
5
6
7
set.seed(1066)
tss <- arima.sim(model = list(ar = 0.3, ma = 0.5), n = 100)
fit <- arrob(tss, method = "yw")
residuals(fit)
fitted(fit)
filtered(fit)
predict(fit)

robts documentation built on May 2, 2019, 4:55 p.m.