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 (2023) for the following hypothesis testing problem:

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

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

Usage

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

Arguments

Y

An n \times p data matrix {\bf Y} = ({\bf y}_1, \dots , {\bf y}_n )', where n is the number of the observations of the p \times 1 time series \{{\bf y}_t\}_{t=1}^n.

lag.k

The time lag K used to calculate the test statistic [See (3) in Chang, Jiang and Shao (2023)]. The default is 2.

B

The number of bootstrap replications for generating multivariate normally distributed random vectors when calculating the critical value. The default is 1000.

type

The map used for constructing the test statistic. Available options include: "Linear" (the default) for the linear identity map and "Quad" for the map including both linear and quadratic terms. type can also be set by the users. See 'Details' and Section 2.1 of Chang, Jiang and Shao (2023) for more information.

alpha

The significance level of the test. The default is 0.05.

kernel.type

The option for choosing the symmetric kernel used in the estimation of long-run covariance matrix. Available options include: "QS" (the default) for the Quadratic spectral kernel, "Par" for the Parzen kernel, and "Bart" for the Bartlett kernel. See Chang, Jiang and Shao (2023) for more information.

Details

Write {\bf x}= (x_1,\ldots,x_p)'. When type = "Linear", the linear identity map is defined as \boldsymbol \phi({\bf x})={\bf x}.

When type = "Quad", \boldsymbol \phi({\bf x})=\{{\bf x}',({\bf x}^2)'\}' includes both linear and quadratic terms, where {\bf x}^2 = (x_1^2,\ldots,x_p^2)'.

We can also choose \boldsymbol \phi({\bf x}) = \cos({\bf x}) to capture certain type of nonlinear dependence, where \cos({\bf x}) = (\cos x_1,\ldots,\cos x_p)'.

See 'Examples'.

Value

An object of class "hdtstest", which contains the following components:

statistic

The test statistic of the test.

p.value

The p-value of the test.

lag.k

The time lag used in function.

type

The map used in function.

kernel.type

The kernel used in function.

References

Chang, J., Jiang, Q., & Shao, X. (2023). Testing the martingale difference hypothesis in high dimension. Journal of Econometrics, 235, 972–1000. \Sexpr[results=rd]{tools:::Rd_expr_doi("doi:10.1016/j.jeconom.2022.09.001")}.

Examples

# Example 1
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 type = "Quad"

## map can also be defined as an expression in R.
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 can also be defined as a function in R.
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 April 3, 2025, 11:07 p.m.