MartG_test: Testing for martingale difference hypothesis in high...

MartG_testR Documentation

Testing for martingale difference hypothesis in high dimension

Description

MartG_test() implements a new test proposed in Chang, Jiang and Shao (2021) for the following hypothesis testing problem:

H_0:\{{\bf x}_t\}_{t=1}^n\mathrm{\ is\ a\ MDS\ \ versus\ \ }H_1: \{{\bf x}_t\}_{t=1}^n\mathrm{\ is\ not\ a\ MDS,}

where MDS is the abbreviation of "martingale difference sequence".

Usage

MartG_test(
  X,
  lag.k = 2,
  B = 1000,
  type = c("Linear", "Quad"),
  alpha = 0.05,
  kernel.type = c("QS", "Par", "Bart")
)

Arguments

X

{\bf X} = \{{\bf x}_1, … , {\bf x}_n \}', an n\times p sample matrix, where n is the sample size and p is the dimension of {\bf x}_t.

lag.k

Time lag K, a positive integer, used to calculate the test statistic. Default is lag.k =2.

B

Bootstrap times for generating multivariate normal distributed random vectors in calculating the critical value. Default is B =2000.

type

String, a map is chosen by the R users, such as the default option is 'Linear' means linear identity map (\boldsymbol φ({\bf x})={\bf x}). Also including another option 'Quad' (Both linear and quadratic terms \boldsymbol φ({\bf x})=\{{\bf x}',({\bf x}^2)'\}'). Also the users can choose set the map themselves, use for example expression(X, X^2), quote(X, X^2), parse(X, X^2), substitute(X, X^2) or just map without function (such as cbind(X, X^2)) to set their own map. See Section 2.1 in Chang, Jiang and Shao (2021) for more information.

alpha

The prescribed significance level. Default is 0.05.

kernel.type

String, an option for choosing the symmetric kernel used in the estimation of long-run covariance matrix, for example, 'QS' (Quadratic spectral kernel), 'Par' (Parzen kernel) and 'Bart' (Bartlett kernel), see Andrews (1991) for more information. Default option is kernel.type = 'QS'.

Value

An object of class "MartG_test" is a list containing the following components:

reject

Logical value. If TRUE, it means rejecting the null hypothesis, otherwise it means not rejecting the null hypothesis.

p.value

Numerical value which represents the p-value of the test.

References

Chang, J., Jiang, Q. & Shao, X. (2021). Testing the martingale difference hypothesis in high dimension.

Examples

n <- 200
p <- 10
X <- matrix(rnorm(n*p),n,p)
res <- MartG_test(X, type="Linear")
res <- MartG_test(X, type=cbind(X, X^2)) #the same as Linear type
res <- MartG_test(X, type=quote(cbind(X, X^2))) # expr using quote
res <- MartG_test(X, type=substitute(cbind(X, X^2))) # expr using substitute
res <- MartG_test(X, type=expression(cbind(X, X^2))) # expr using expression
res <- MartG_test(X, type=parse(text="cbind(X, X^2)")) # expr using parse
map_fun <- function(X) {X <- cbind(X,X^2); X}
res <- MartG_test(X, type=map_fun)
Pvalue <- res$p.value
rej <- res$reject

HDTSA documentation built on Jan. 7, 2023, 5:26 p.m.

Related to MartG_test in HDTSA...