get_lrv_vec {CPAT} | R Documentation |
Long-Run Variance Estimation With Possible Change Points
Description
Computes the estimates of the long-run variance in a change point context, as
described in (Rice et al. ). By default it uses
kernel and bandwidth selection as used in the package cointReg, though
changing the parameters kernel
and bandwidth
can change this
behavior. If cointReg is not installed, the Bartlett internal (defined
internally) will be used and the bandwidth will be the square root of the
sample size.
Usage
get_lrv_vec(dat, kernel = "ba", bandwidth = "and")
Arguments
dat |
The data vector |
kernel |
If character, the identifier of the kernel function as used in
cointReg (see |
bandwidth |
If character, the identifier for how to compute the
bandwidth as defined in cointReg (see
|
Value
A vector of estimates of the long-run variance
References
Rice G, Miller C, Horváth L (????). “A new class of change point test of Rényi type.” in-press.
Examples
x <- rnorm(1000)
CPAT:::get_lrv_vec(x)
CPAT:::get_lrv_vec(x, kernel = "pa", bandwidth = "nw")