Description Usage Arguments Details Value Author(s) References See Also Examples
Robust fit of an autoregressive model to a time series. Its order is either optimized with respect to a robustified AIC or specified by the user.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | arrob(x, aic = TRUE, order.max, method = c("yw", "regression", "gm", "filter"),
na.action = na.fail, series = deparse(substitute(x)),asyvar=FALSE,bootpar=list(num=100,blockl=floor(2*length(x)^(1/2))), ...)
arrob.yw(x, order.max, aic = TRUE, aicpenalty = function(p) 2*p,
na.action = na.fail, series = deparse(substitute(x)),
acf.approach = c("GK", "median", "multi", "partrank", "RA", "rank",
"filter", "trim", "bireg"), locfn = median, scalefn = Qn, ...)
arrob.regression(x, order.max, aic = TRUE, aicpenalty = function(p) 2*p,
na.action = na.fail, series = deparse(substitute(x)),
intercept = TRUE, scalefn = Qn, ...)
arrob.filter(x, order.max, aic = TRUE, aicpenalty = function(p) 2*p,
na.action = na.fail, series = deparse(substitute(x)),
psi.l = 2, psi.0 = 3)
|
x |
numeric vector of a univariate time series. |
aic |
logical indicating whether the AR order should be estimated by robust AIC criteria considering orders up to |
order.max |
integer value determining the (maximal) order of the AR fit. If missing, this value is chosen to be |
method |
character string naming the estimation method to be used, see Details. |
na.action |
function to be called to handle missing values. Default is |
series |
the time series name. |
asyvar |
logical indicating whether the covariance matrix of the fitted AR coefficients should be estimated by a block bootstrap. The default is |
bootpar |
list containing parameters of the blockbootstrap which is used to estimate the variance of the fitted AR coefficients, see Details. |
aicpenalty |
function of the model order defining the penalty term of the model selection criteria. The default results in a robust AIC. |
... |
further arguments to be passed to internal function |
acf.approach |
character string naming the function to calculate the autocorrelation function. See |
locfn |
function which calculates a location estimator. Its argument must be a vector of the data. |
scalefn |
function which calculates a scale estimator. Its argument must be a vector of the data. One could for example use one of the functions |
intercept |
logical whether the regression model includes an intercept. |
psi.l |
numeric value determining the psi function, see the help page of |
psi.0 |
numeric value determining the psi function, see the help page of |
There are many possibilities for robust estimation of AR models. The argument method
specifies which of the following methods is to be used, where method = "yw"
is the default.
"yw"
One approach is to use a roust estimation of the autocorrelation function. The corresponding AR coefficients can be then either computed by solving the Yule-Walker equations method = "yule-walker"
employing the Durbin-Levinson algorithm. The acf estimator can be determined by acf.fun
. See the help page of acfrob
for an overview of implemented procedures for estimation of the acf.
"regression"
The AR coefficients are computed by a robust regression. Here the dependent variable is the time series x
and the independent variables are the up to order.max
lagged time series. The regression is done by MM estimation with the function lmrob
, see Rousseeuw et al. (2014).
"filter"
The regression coefficients are computed via robust filtering as described in Chapter 8.6 of Maronna et al. (2006). See the help page of ARfilter
for details.
"gm"
Generalized M estimates are used for obtaining an AR fit as described in Maronna et al. (2006). See the help page of arrob.gm
for details and further arguments which are passed to that function by the ...
argument.
If aic = TRUE
, AR models for every order up to order.max
are estimated and the one with the smallest model selection criterion returned. The criterion is the sum of the logarithm of a robust variance estimation of the residuals and a penalty term pen(p) divided by n-p depending on the AR order p, i.e.,
log(sigma_hat^2) + (pen(p))/(n-p)
The penalty term can be set by the argument aicpenalty
.
If asyvar=TRUE
the variance of the fitted AR coefficients is estimated by a moving block bootstrap, see Lahiri (1999) for a detailed description of this method. The blocklength can be set by the blockl
argument and thr number of bootstrap repetitions by num
. Note that there are no theoretical justifications that this estimation is consistent for robust methods.
Object of classes "arrob"
and "ar"
. This is a list which includes all elements of an object of class "ar"
(see ar
for details) plus the following additional element:
x |
the original time series |
Note that list element aic
gives the value of the robust information criterion and not its difference with the lowest information criterion of all considered models, as it is returned by the function ar
.
Alexander Dürre, Tobias Liboschik and Jonathan Rathjens
Lahiri, S.N. (1999): Theoretical Comparisons of Block Bootstrap Methods, The annals of Statistics, vol. 27, 386–404.
Maronna, R. A., Martin, R. D., and Yohai, V. J. (2006): Robust Statistics: Theory and Methods, Wiley, chapter 8, doi: 10.1002/0470010940.
Rousseeuw, P., Croux, C., Todorov, V., Ruckstuhl, A., Salibian-Barrera, M., Verbeke, T., Koller, M. and Maechler, M. (2014): robustbase: Basic Robust Statistics. R package version 0.91-1. URL http://cran.r-project.org/package=robustbase.
Classical, nonrobust fitting is provided by the function ar
.
S3 methods residuals.arrob
, fitted.arrob
, filtered.arrob
and predict.arrob
for objects of class "arrob"
.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.