Learn R Programming

MSTest (version 0.1.9)

MMCLRpval_fun: Monte Carlo Likelihood Ratio Test P-value Function

Description

This function computes the Maximum Monte Carlo P-value. When pre-drawn innovations are provided, the same fixed draws are used for every theta evaluation (Dufour 2006, Proposition 4.2).

Usage

MMCLRpval_fun(
  theta_h0,
  mdl_h0,
  k1,
  LRT_0,
  N,
  burnin,
  workers,
  lambda,
  stationary_constraint,
  thtol,
  Z,
  exog,
  mdl_h0_control,
  mdl_h1_control,
  predrawn_eps = NULL,
  predrawn_state_rand = NULL
)

Value

MMC p-value

Arguments

theta_h0

vector of parameter values under the null being considered.

mdl_h0

List with restricted model properties.

k1

integer determining the number of regimes under the alternative.

LRT_0

double specifying the fixed observed likelihood ratio test statistic.

N

integer specifying the number of replications.

burnin

integer specifying the number of observations to drop from beginning of simulation.

workers

Integer determining the number of workers to use for parallel computing.

lambda

Double determining penalty on nonlinear constraint.

stationary_constraint

Boolean determining if only stationary solutions are considered (if TRUE) or not (if FALSE).

thtol

double determining the convergence criterion used during estimation.

mdl_h0_control

List with controls/options used to estimate restricted model.

mdl_h1_control

List with controls/options used to estimate unrestricted model.

predrawn_eps

Optional list of pre-drawn standard normal matrices (fixed across theta evaluations).

predrawn_state_rand

Optional matrix of pre-drawn U[0,1] for state transitions.