Learn R Programming

MSTest (version 0.1.9)

MCpval: Monte Carlo P-value

Description

This function computes the Monte Carlo P-value.

Usage

MCpval(test_stat, null_vec, type = "geq")

Value

MC p-value of test

Arguments

test_stat

Test statistic under the alternative (e.g. S_0).

null_vec

A (N x 1) vector with test statistic under the null hypothesis.

type

String determining the type of test. Options are "geq" (right/upper-tail test; the default), "leq" (left/lower-tail test), "two-tailed" (or "two-tail"; two-sided test), and "absolute" (or "abs"; the upper-tail rule, intended for non-negative statistics). An unrecognized value raises an error.

References

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.