Subsample.test: Subsampling test of Whang and Kim (2003)

View source: R/Subsample.test.R

Subsample.testR Documentation

Subsampling test of Whang and Kim (2003)

Description

The function returns the p-values of the subsampling test.

Usage

Subsample.test(y, kvec)

Arguments

y

a vector of time series, typically financial return

kvec

a vector of holding periods

Details

The block lengths are chosen internally using the rule proposed in Whang and Kim (2003)

Value

Holding.Period

holding periods used

Block.Length

block lengths chosen

pval

p-values of the test for each block length used

Author(s)

Jae H. Kim

References

WHANG,Y.-J., J. KIM, 2003, A Multiple Variance Ratio Test Using Subsampling, Economics Letters, 79, 225-230.

Examples

data(exrates)
y <- exrates$ca                  
nob <- length(y)
r <- log(y[2:nob])-log(y[1:(nob-1)])   
kvec <- c(2,5,10)
Subsample.test(r,kvec)

vrtest documentation built on Aug. 31, 2023, 9:08 a.m.