Description Usage Arguments Details Value Author(s) References See Also Examples
Robustly estimates the autocorrelation function of a time series based on nonparametric estimators using ranks and signs. See Dürre et al. (2015) for details.
This function is intended for internal usage only. Users should rather use the wrapper function acfrob
with argument approach = "acfrank"
.
1 2 | acfrob.rank(x, lag.max, cor.method=c("gaussian", "spearman", "kendall", "quadrant",
"masarotto"), biascorr = TRUE)
|
x |
univariate numeric vector or time series object. |
lag.max |
integer value giving the maximum lag at which to calculate the acf. |
cor.method |
character string indicating the used correlation estimator. Must be one of |
biascorr |
logical indicating whether a bias correction of the result should be done. Note that this bias correction is only valid for Gaussian processes. There is no bias correction available for |
The function estimates the acf using rank correlation estimators, which estimate the autocorrelations individually for every lag. The approach works also well for count time series, see Fried et al. (2014).
There are several possible rank estimators available. The argument cor.method
specifies which of the following approaches is to be used, where cor.method = "gaussian"
is the default.
"gaussian"
One uses the Gaussian rank correlation which is the usual empirical correlation applied to transformed values. Denote R(i) the rank of X(i) and Phi the distribution function of the normal distribution, then the transformation is defined as
Φ^{-1}(R(i)/(n+1)).
This estimator has the same asymptotic efficiency as the usual empirical correlation under normality, but is robust to some degree.
"spearman"
One uses the well known Spearman's rho with a consistency correction under normality. See Croux and Dehon (2010) for this correction and cor
for more information about Spearman's rho.
"kendall"
One uses the well known Kendall's tau with a consistency correction under normality. See Croux and Dehon (2010) for this correction and cor
for more information about Kendall's tau. Note that Kendall's tau can get rather time consuming for very long time series (e.g. larger than 10000 observations).
"quadrant"
One uses the quadrant correlation with a consistency correction under normality. See Croux and Dehon (2010) for this correction and more information about the estimator. Note that this estimator has a rather low efficiency under normality and should therefore only be applied for time series with many outliers.
"masarott0"
One uses the M estimator proposed by Masarotto (1987). Starting from initial estimations for the variance by the Qn
and for the correlation by the GK estimator (using the Qn), new variances and correlations are iteratively computed until convergence using weights which are defined by the following psi function:
psi(x) = 3/(1+x).
Note that this is not really a rank or sign based estimator. See Masarotto (1987) for more details.
A named list of the following elements:
acfvalues |
Numeric vector of estimated autocorrelations at the lags 1,..., |
are |
numeric value giving the asymptotic relative efficiency (ARE) of the estimator as compared to the classical nonrobust estimator, under the assumption that the observations are uncorrelated and from a Gaussian distribution. |
Alexander Dürre, Tobias Liboschik and Jonathan Rathjens
Croux, C. and Dehon, C. (2010): Influence functions of the Spearman and Kendall correlation measures, Statistical Methods & Applications, vol. 19, 497–515, doi: 10.1007/s10260-010-0142-z.
Fried, R., Liboschik, T., Elsaid, H., Kitromilidou, S. and Fokianos, K. (2014): On outliers and interventions in count time series following GLMs, Austrian Journal of Statistics, vol. 43, 181-193, doi: 10.17713/ajs.v43i3.30.
Dürre, A., Fried, R. and Liboschik, T. (2015): Robust estimation of (partial) autocorrelation, Wiley Interdisciplinary Reviews: Computational Statistics, vol. 7, 205–222, doi: 10.1002/wics.1351.
Masarotto, D. (2003): Robust identification of autoregressive moving average models, Applied statistics, vol. 36, 214–220, doi: 10.2307/2347553.
The wrapper function acfrob
.
Alternative acf subroutines: acfrob.GK
, acfrob.filter
, acfrob.multi
, acfrob.partrank
, acfrob.RA
, acfrob.bireg
, acfrob.trim
.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.