MartG_test function

Testing for martingale difference hypothesis in high dimension

Testing for martingale difference hypothesis in high dimension

MartG_test() implements a new test proposed in Chang, Jiang and Shao (2023) for the following hypothesis testing problem: [REMOVE_ME]H0:{yt}t=1n is a MDS  versus  H1:{yt}t=1n is not a MDS,[REMOVEME2] 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}\,, [REMOVE_ME_2] where MDS is the abbreviation of "martingale difference sequence".

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×pn \times p data matrix Y=(y1,,yn){\bf Y} = ({\bf y}_1, \dots , {\bf y}_n )', where nn is the number of the observations of the p×1p \times 1

    time series {yt}t=1n\{{\bf y}_t\}_{t=1}^n.

  • lag.k: The time lag KK 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.

Returns

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.

Description

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

H0:{yt}t=1n is a MDS  versus  H1:{yt}t=1n is not a MDS, 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".

Details

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

When type = "Quad", ϕ(x)={x,(x2)}\boldsymbol \phi({\bf x})=\{{\bf x}',({\bf x}^2)'\}'

includes both linear and quadratic terms, where x2=(x12,,xp2){\bf x}^2 = (x_1^2,\ldots,x_p^2)'.

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

See 'Examples'.

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

References

Chang, J., Jiang, Q., & Shao, X. (2023). Testing the martingale difference hypothesis in high dimension. Journal of Econometrics, 235 , 972--1000. tools:::Rd_expr_doi("doi:10.1016/j.jeconom.2022.09.001") .

  • Maintainer: Chen Lin
  • License: GPL-3
  • Last published: 2025-01-28