Qu.test: Qu test for true long memory against spurious long memory.

Description Usage Arguments References Examples

View source: R/Qu_test.R

Description

Qu.test Test statistic of Qu (2011) for the null hypotesis of true long memory against the alternative of spurious long memory.

Usage

1
Qu.test(data, m, epsilon = 0.05)

Arguments

data

data vector of length T.

m

bandwith parameter specifying the number of Fourier frequencies used for the estimation usually floor(1+T^delta), where 0.5<delta<0.8 for consistency.

epsilon

trimming parameter epsilon=0.05 by default. Determines minimum number of Fourier frequencies used in test statistic. For T>500 it is recommended to use epsilon=0.02.Confer Qu (2011) for further details.

References

Qu, Z. (2011): A Test Against Spurious Long Memory. Journal of Business and Economic Statistics, Vol. 29, No. 3, pp. 423 - 438.

Examples

1
2
3
4
5
6
7
8
9
library(fracdiff)
T<-500
m<-floor(1+T^0.75)
series<-fracdiff.sim(n=T,d=0.4)$series
shift.series<-ARRLS.sim(T=500,phi=0.5, sig.shift=0.75, prob=5/T, sig.noise=1)
ts.plot(series, ylim=c(min(min(series),min(shift.series)),max(max(series),max(shift.series))))
lines(shift.series, col=2)
Qu.test(series,m=m, epsilon=0.05)
Qu.test(shift.series,m=m, epsilon=0.05)

Example output

$W.stat
[1] 0.4551643

$CriticalValues
           eps=.02 eps=.05
alpha=.1     1.118   1.022
alpha=.05    1.252   1.155
alpha=.025   1.374   1.277
alpha=.01    1.517   1.426

$W.stat
[1] 1.812276

$CriticalValues
           eps=.02 eps=.05
alpha=.1     1.118   1.022
alpha=.05    1.252   1.155
alpha=.025   1.374   1.277
alpha=.01    1.517   1.426

LongMemoryTS documentation built on May 2, 2019, 5:58 a.m.