Learn R Programming

robcor (version 0.1-6)

robar: Robust Fit Autoregressive Models to Time Series

Description

Fit an autoregressive time series model to the data using robust algorithms.

Usage

robar(x, order = 2, scaler = "s_FastQn")

Arguments

x
a univariate time series.
order
an order of model to fit.
scaler
location-scale estimator to use in the algorithm. By default, s_FastQn() is used.

Value

A list of class "ar". For description of elements see ar().

Details

This function is a robust replacement for ar().

Note, that implementation and documentation is not finished/polished yet.

References

Shevlyakov, G. L., Lyubomishchenko, N. S. and Smirnov, P. O. (2013). Some remarks on robust estimation of power spectra. Proceedings of the 11th International Conference on Computer Data Analysis and Modeling, Minsk, Belarus, 97--104.

Examples

Run this code
n <- 100
set.seed(361)
eps <- as.ts(rnorm(n))
x <- arima.sim(list(ar=c(1,-0.9)), n, innov=eps) # basic signal
z <- as.ts(rbinom(n, 1, 0.1) * rnorm(n, sd=10))  # noise
y <- x + z
spec.ar(robar(y, order=2))

Run the code above in your browser using DataLab