DLMMCpval_fun: Moment-based MMC test p-value

View source: R/RcppExports.R

DLMMCpval_funR Documentation

Moment-based MMC test p-value

Description

This functions is used by numerical optimization algorithms for find maximum p-value given parameter vector theta.

Usage

DLMMCpval_fun(
  theta,
  y,
  x,
  params,
  sim_stats,
  pval_type,
  stationary_ind,
  lambda
)

Arguments

theta

Value of nuisance parameters. Specifically, these are the consistent estimates of nuisance parameters as discussed in Dufour & Luger (2017) LMC procedure.

y

series being tested.

x

lagged values of series.

params

A (2 x 4) matrix with parameters to combine test statistics. See approxDistDL.

sim_stats

A (N x 1) vector with test statistics. The last element is the test statistic from observed data.

pval_type

String determining the type of method used to combine p-values. If set to "min" the min method of combining p-values is used as in Fisher 1932 and Pearson 1933. If set to "prod" the product of p-values is used as in Tippett 1931 and Wilkinson 1951.

stationary_ind

Boolean indicator determining if only stationary solutions should be considered if TRUE or any solution can be considered if FALSE. Default is TRUE.

lambda

Numeric value for penalty on stationary constraint not being met. Default is 100.

Value

Maximized Monte Carlo p-value.

References

Dufour, J. M., & Luger, R. 2017. "Identification-robust moment-based tests for Markov switching in autoregressive models." Econometric Reviews, 36(6-9), 713-727.


roga11/MSTest documentation built on Feb. 25, 2025, 6:10 p.m.