MartG_test | R Documentation |
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".
MartG_test(
Y,
lag.k = 2,
B = 1000,
type = c("Linear", "Quad"),
alpha = 0.05,
kernel.type = c("QS", "Par", "Bart")
)
Y |
An |
lag.k |
The time lag |
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: |
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: |
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'.
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. |
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")}.
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.