arima.rob: Robust Fit of a REGARIMA Model and Outliers Detection

Description Usage Arguments Value Warning References See Also Examples

View source: R/arima.rob.R

Description

Returns an object of class "arima.rob" that represents a robust fit of a linear regression model with ARIMA errors using a filtered tau-estimate. The error model may have seasonal differences and one seasonal moving average parameter. It also returns the detected outliers and level shifts.

Usage

1
2
3
4
arima.rob(formula, data, contrasts=NULL, start=NULL, end=NULL,
      p=0, q=0, d=0, sd=0, freq=1, sfreq=NULL, sma=FALSE,
      max.p=NULL, auto.ar=FALSE, n.predict=20, tol=10^(-6),
      max.fcal=2000, iter=FALSE, innov.outlier=FALSE, critv=NULL, ...)

Arguments

formula

a formula object, with the response on the left of a ~ operator, and the terms, separated by + operators, on the right.

data

a data frame or a "timeSeries" object with a data frame in the data slot, which is used to interpret the variables named in formula. If this is missing, then the variables in formula should be on the search list. Missing values are not allowed.

contrasts

the same as the contrasts argument for lm function.

start

a character string which can be passed to timeDate function to specify the starting date for the estimation. This can only be used if the data argument is a "timeSeries" data frame. The default is NULL.

end

a character string which can be passed to timeDate function to specify the ending date for the estimation. This can only be used if the data argument is a "timeSeries" data frame. The default is NULL.

p

the autoregressive order of the errors model. The default is 0.

q

the moving average order of the errors model. The default is 0.

d

the number of regular differences in the ARIMA model. It must be 0, 1 or 2. The default is 0.

sd

the number of seasonal differences. It must be 0, 1 or 2. The default is 0.

freq

the frequency of data. The default is 1.

sfreq

the seasonality frequency of data. If NULL, it is set to be equal to freq. The default is NULL.

sma

logical flag: if TRUE, the errors model includes a seasonal moving average parameter. The default is FALSE.

auto.ar

logical flag: If TRUE an AR(p) model is selected automatically using a robust AIC criterion. The default is FALSE.

max.p

the maximum order of the autoregressive stationary model that approximates the ARMA stationary model. If NULL, max.p=max(p+q,5). If q=0, then max.p is not necessary. The default is NULL.

n.predict

the maximum number of future periods for which we wish to compute the predictions. The default is 20.

tol

the tolerance for convergence.

max.fcal

the maximum number of function evaluations.

iter

a logical flag or the number of iterations to execute arima.rob with.

innov.outlier

logical flag: if TRUE, the function arima.rob looks for innovation outliers in addition to additive outliers and level shifts; otherwise, arima.rob only looks for additive outliers and level shifts. The default is FALSE.

critv

the critical value for detecting outliers. If NULL, it assumes the following default values: critv=3 if the length of the time series is less than 200; critv=3.5 if it is between 200 and 500, and critv=4 if it is greater than 500.

...

extra arguments passed to or from other methods.

Value

an object of class "arima.rob" representing the fit and the outliers detected. See arima.rob.object for details of the components of the object.

Warning

When either d or sd is greater than zero, the interpretation of the intercept in the formula is different from its usual interpretation: it represents the coefficient of the lowest order power of the time trend which can be identified. For example, if d=2 and sd=0, the intercept represents the coefficient of the term t^2.

References

Bianco, A., Garcia Ben, M., Martinez, E., and Yohai, V. (1996). Robust procedures for regression models with ARIMA errors. COMPSTAT 96, Proceedings in Computational Statistics. Ed. Albert Prat, pages. 27-38. Physica-Verlag, Heidelberg.

Bianco, A., Garcia Ben, M., Martinez, E., and Yohai, V. (1997). Outlier detection in regression models with ARIMA errors using robust estimates. mimeo.

Chang, I., Tiao, G. C., and Chen, C. (1988). Estimation of time series parameters in the presence of outliers. Technometrics, 30:193-204.

Martin, R. D., Samarov, A., and Vandaele, W. (1983). Robust methods for ARIMA models. in Applied Time Series Analysis of Economic Data, E. Zellner, ed.

Yohai, V. Y., and Zamar, R. H. (1988). High breakdown-point estimates of regression by means of the minimization of an efficient scale. Journal of the American Statistical Association, 83:406-413.

See Also

arima.rob.object.

Examples

1
frip.rr <- arima.rob(log(frip.dat) ~ 1, p=2, d=1)

Example output



robustarima documentation built on May 1, 2021, 1:06 a.m.