This function computes the Monte Carlo P-value.
MCpval(test_stat, null_vec, type = "geq")
MC p-value of test
Test statistic under the alternative (e.g. S_0
).
A (N x 1
) vector with test statistic under the null hypothesis.
String determining type of test. options are: "geq" for right-tail test, "leq" for left-tail test, "abs" for absolute value test and "two-tail" for two-tail test.
Dufour, Jean-Marie 2006. "Monte Carlo tests with nuisance parameters: A general approach to finite-sample inference and nonstandard asymptotics". Journal of Econometrics, 133(2), 443-477.
Dufour, Jean-Marie, and Richard Luger. 2017. "Identification-robust moment-based tests for Markov switching in autoregressive models". Econometric Reviews, 36(6-9), 713-727.