cov_kernel: Kernel estimation: bootstrap method

Description Usage Arguments Value References Examples

View source: R/slm-main.R

Description

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.

Usage

1
2
3
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)

Arguments

epsilon

an univariate process.

model_selec

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.

model_max

the maximal order.

kernel_fonc

define the kernel to use in the method. The user can give his own kernel function.

block_size

size of the bootstrap blocks. block_size must be greater than model_max.

block_n

blocks number to use for the bootstrap.

plot

logical. By default, plot = FALSE. If plot = TRUE, the risk curve is returned and the ACF of the process.

Value

The method returns the tapered autocovariance vector with model_selec autocovariance terms.

model_selec

the number of selected autocovariance terms.

cov_st

the estimated autocovariances.

References

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–1768.

Examples

1
2
x = arima.sim(list(ar=c(0.7)),1000)
cov_kernel(x, model_selec = -1, block_n = 10, plot = TRUE)

E-Caron/slm documentation built on Jan. 9, 2020, 1:30 p.m.