Computes a data-driven histogram estimator of the spectral density of a process and compute its Fourier coefficients,
that is the associated autocovariances. For a dimension \(d\), the estimator of the spectral density is an histogram on a regular basis of
size \(d\). Then we use a penalized criterion in order to choose the dimension which balance the bias and the variance, as proposed in Comte (2001). The penalty
is of the form \(c*d/n\), where \(c\) is the constant and \(n\) the sample size. The dimension and the constant of the penalty are
chosen with the slope heuristic method, with the dimension jump algorithm (from package "capushe
").
cov_spectralproj(epsilon, model_selec = -1,
model_max = min(100,length(epsilon)/2), plot = FALSE)
numeric vector. An univariate process.
integer. The dimension of the method. If model_selec = -1
, the method works automatically and take a dimension between 1 and model_max
.
integer. The maximal dimension. By default, it is equal to the minimum between 100 and the length of the process divided by 2.
logical. By default, plot = FALSE
. If plot = TRUE
, plot the spectral density estimator of the process.
The function returns the estimated autocovariances of the process, that is the Fourier coefficients of the spectral density estimate, and the dimension chosen by the algorithm.
the dimension selected.
the estimated autocovariances.
J.P. Baudry, C. Maugis B. and Michel (2012). Slope heuristics: overview and implementation. Statistics and Computing, 22(2), 455<U+2013>470.
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.
F. Comte (2001). Adaptive estimation of the spectrum of a stationary Gaussian sequence. Bernoulli, 7(2), 267-298.
The R package capushe
.
Slope heuristic algorithm DDSE
.
Dimension jump algorithm Djump
.
# NOT RUN {
x = arima.sim(list(ar=c(0.2), ma=c(0.3,0.05)), n=100)
cov_spectralproj(x, model_selec = -1)
# }
Run the code above in your browser using DataLab