This method estimates the spectral density and the autocovariances of the error process via a lag-window
(or kernel) estimator (see P.J. Brockwell and R.A. Davis (1991). Time Series: Theory and Methods. Springer Science & Business Media,
page 330). The weights are computed according to a kernel \(K\) and a bandwidth \(h\) (or a lag),
to be chosen by the user. The lag can be computed automatically by using a bootstrap technique (as in Wu and Pourahmadi (2009)), via the Rboot
function.
cov_kernel(epsilon, model_selec = -1,
model_max = min(50,length(epsilon)/2), kernel_fonc = triangle,
block_size = length(epsilon)/2, block_n = 100, plot = FALSE)
numeric vector. An univariate process.
integer or -1
. The order of the method. If model_selec = -1
, the method chooses
the treshold automatically. If model_selec = k
, then only k
autocovariance terms are kept
and smoothed by the kernel.
integer. The maximal order.
function. Defines the kernel to use in the method. The user can give his own kernel function.
integer. If model_selec = -1
, it specifies the size of the bootstrap blocks. block_size
must be greater than model_max
.
integer. If model_selec = -1
, blocks number to use for the bootstrap.
logical. By default, plot = FALSE
. If plot = TRUE
, the risk curve is returned and the
ACF of the process.
The method returns the tapered autocovariance vector with model_selec
autocovariance terms.
the number of selected autocovariance terms.
the estimated autocovariances.
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.
W.B. Wu, M. Pourahmadi (2009). Banding sample autocovariance matrices of stationary processes. Statistica Sinica, pp. 1755<U+2013>1768.
# NOT RUN {
x = arima.sim(list(ar=c(0.7)),1000)
cov_kernel(x, model_selec = -1, block_n = 10, plot = TRUE)
# }
Run the code above in your browser using DataLab