This method estimates the spectral density and the autocovariances of the error process via a lag-window estimator based on the rectangular kernel (see P.J. Brockwell and R.A. Davis (1991). Time Series: Theory and Methods. Springer Science & Business Media, page 330). The lag is computed according to Efromovich's algorithm (Efromovich (1998)).
cov_efromovich(epsilon, plot = FALSE)
numeric vector. An univariate process.
logical. By default, plot = FALSE
. If plot = TRUE
, the ACF of the process epsilon
is plotted.
The function returns the estimated autocovariances of the process, that is the Fourier coefficients of the spectral density estimates, and the order chosen by the algorithm.
the number of selected autocovariance terms.
the estimated autocovariances.
P.J. Brockwell and R.A. Davis (1991). Time Series: Theory and Methods. Springer Science & Business Media.
E. Caron, J. Dedecker and B. Michel (2019). Linear regression with stationary errors: the R package slm. arXiv preprint arXiv:1906.06583. https://arxiv.org/abs/1906.06583.
S. Efromovich (1998). Data-driven efficient estimation of the spectral density. Journal of the American Statistical Association, 93(442), 762-769.
# NOT RUN {
x = arima.sim(list(ar=c(0.4,0.2)),1000)
cov_efromovich(x)
# }
Run the code above in your browser using DataLab