asymvar.acf: Calculation of the Long Run Variance Based on a Kernel...

Description Usage Arguments Details Value See Also Examples

Description

Computes the long run variance, which is required for change point testing, by a kernel estimation.

Usage

1
2
asymvar.acf(x, obs = c("untransformed", "ranks"), cc = 1.4, K = 3,
            type = c("bartlett", "trapezoid"))

Arguments

x

numeric vector or univariate time series object.

obs

character string indicating whether the long run variance of a cusum statistic ("untransformed") or of a Wilcoxon statistic ("ranks") is calculated.

cc

numeric value which determines the chosen bandwidth, see Details.

K

numeric value which determines the chosen bandwidth, see Details.

type

character string determining the used kernel, see Details.

Details

Cusum-type change point tests require an estimation of the long run variance. One possibility is to use a kernel estimation which downweights empirical autocorrelations of larger lags which one cannot reliable estimate. There are different tuning options regarding the bandwidth bw and kernel. For the later only two are implemented:

If kernel is "bartlett", one uses the classical Bartlett kernel which is defined as

k(x)= 1 - x/bn~~\mbox{for}~|x|≤q bw~~\mbox{and}~~ 0~~\mbox{for}~|x|>bw

If kernel is "trapezoid", the following flat-top kernel is used

k(x)= 1 ~~\mbox{for}~ |x|≤q bw,~~ 1-|x-bw|/bw~~\mbox{for}~2bw≤q |x|>bw~~\mbox{and}~~ 0~~\mbox{for}~x>2bw

For the bandwidth a data-adaptive thumb rule depending on two tuning parameters is used. The basic idea is to determine after which lag the autocorrelation is negligible. Therefor one looks if the empirical acf is smaller than

cc √{\log_{10}(N)/N}.

If the next K autocorrelations also fulfill this criterion, this lag is considered as bandwidth.

Value

List containing the following named elements:

lrv

estimated long run variance

bandwidth

used bandwidth

See Also

The long run variance can be also estimated by asymvar.window and asymvar.acfextra.

Examples

1
2
3
set.seed(1066)
tss <- arima.sim(model = list(ar = 0.3, ma = 0.5), n = 100)
asymvar.acf(tss)

robts documentation built on May 2, 2019, 4:55 p.m.