CUSUMfixed: Self-normalized CUSUM tests for structural change under long...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/CUSUMfixed.R

Description

This function performs a family of CUSUM tests for a change-in-mean that are robust under long memory. They apply non-parametric kernel-based fixed-b and fixed-m long-run variance estimators in the denominator of the test statistics. The function returns the test statistic as well as critical values.

Usage

1
CUSUMfixed(x, d, procedure, bandw, tau = 0.15)

Arguments

x

the univariate numeric vector to be investigated. Missing values are not allowed.

d

integer that specifies the long-memory parameter.

procedure

string that specifies whether the CUSUM fixed-b or fixed-m type A or type B tests are used. It can be chosen between "CUSUMfixedb_typeA", "CUSUMfixedb_typeB", "CUSUMfixedm_typeA", and "CUSUMfixedm_typeB" (see Wenger, Leschinski (2019) for details).

bandw

integer that determines the bandwidth used for estimation of the long-run variance. For the fixed-b tests b=[0.05,0.1,0.2,0.3,...,0.9,1], for the fixed-m tests m=[1,2,3,4,10,25,50,100,150,200]. Recommended bandwidth by Wenger, Leschinski (2019) are b=0.1 and m=10.

tau

integer that defines the search area, which is [tau,1-tau]. Default is tau=0.15 as suggested by Andrews (1993).

Details

Note that the critical values are generated for tau=0.15 using the Bartlett kernel for the fixed-b tests or averaging the first m periodogram ordinates (which corresponds to the Daniell kernel) for the fixed-m tests.

Value

Returns a numeric vector containing the test statistic and the corresponding critical values of the test.

Author(s)

Kai Wenger

References

Wenger, K. and Leschinski, C. (2019): Change-in-mean tests in long-memory time series: a review of recent developments. AStA Advances in Statistical Analysis, 103:2, pp. 237-256.

Hualde, J. and Iacone, F. (2017): Fixed bandwidth asymptotics for the studentized mean of fractionally integrated processes. Economics Letters, 150, pp. 39-43.

Andrews, D. W. K. (1993): Tests for Parameter Instability and Structural Change With Unknown Change Point. Econometrica, 61, pp. 821-856.

See Also

CUSUMLM, CUSUM_simple, fixbsupw

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# set model parameters
T        <- 500
d        <- 0.2

set.seed(410)

# generate a fractionally integrated (long-memory) time series
tseries  <- fracdiff::fracdiff.sim(n=T, d=d)$series

# generate a fractionally integrated (long-memory) time series 
# with a change in mean in the middle of the series
changep  <- c(rep(0,T/2), rep(1,T/2))
tseries2 <- tseries+changep

# estimate the long-memory parameter of both series via local 
# Whittle approach. The bandwidth to estimate d is chosen 
# as T^0.65, which is usual in literature
d_est    <- LongMemoryTS::local.W(tseries, m=floor(1+T^0.65))$d
d_est2   <- LongMemoryTS::local.W(tseries2, m=floor(1+T^0.65))$d

# perform the different types of the test on both time series
CUSUMfixed(tseries, d=d_est, procedure="CUSUMfixedb_typeA", bandw=0.1)
CUSUMfixed(tseries, d=d_est, procedure="CUSUMfixedb_typeB", bandw=0.1)
CUSUMfixed(tseries, d=d_est, procedure="CUSUMfixedm_typeA", bandw=10)
CUSUMfixed(tseries, d=d_est, procedure="CUSUMfixedm_typeB", bandw=10)

CUSUMfixed(tseries2, d=d_est2, procedure="CUSUMfixedb_typeA", bandw=0.1)
CUSUMfixed(tseries2, d=d_est2, procedure="CUSUMfixedb_typeB", bandw=0.1)
CUSUMfixed(tseries2, d=d_est2, procedure="CUSUMfixedm_typeA", bandw=10)
CUSUMfixed(tseries2, d=d_est2, procedure="CUSUMfixedm_typeB", bandw=10)
# For the series with no change in mean all tests do not reject 
# the null hypothesis of a constant mean across time at 
# any reasonable significance level.
# For the series with a change in mean all tests reject the 
# null hypothesis at a 1% significance level.

Example output

          90%           95%           99% Teststatistic 
        1.075         1.400         1.426         0.880 
          90%           95%           99% Teststatistic 
        1.720         1.993         2.593         0.985 
          90%           95%           99% Teststatistic 
        1.294         1.415         1.614         0.830 
          90%           95%           99% Teststatistic 
        1.562         1.785         2.247         0.883 
          90%           95%           99% Teststatistic 
        1.194         1.378         1.420         1.555 
          90%           95%           99% Teststatistic 
        2.346         2.748         3.612         4.613 
          90%           95%           99% Teststatistic 
        1.549         1.664         1.844         2.033 
          90%           95%           99% Teststatistic 
        2.221         2.565         3.248         4.133 

memochange documentation built on July 27, 2020, 1:09 a.m.