This functions is used by numerical optimization algorithms for find maximum p-value given parameter vector theta
.
DLMMCpval_fun(
theta,
y,
x,
params,
sim_stats,
pval_type,
stationary_ind,
lambda
)
Maximized Monte Carlo p-value.
Value of nuisance parameters. Specifically, these are the consistent estimates of nuisance parameters as discussed in Dufour & Luger (2017) LMC procedure.
series being tested.
lagged values of series.
A (2 x 4
) matrix with parameters to combine test statistics. See approxDistDL
.
A (N x 1
) vector with test statistics. The last element is the test statistic from observed data.
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.
Boolean indicator determining if only stationary solutions should be considered if TRUE
or any solution can be considered if FALSE
. Default is TRUE
.
Numeric value for penalty on stationary constraint not being met. Default is 100
.
Dufour, J. M., & Luger, R. 2017. "Identification-robust moment-based tests for Markov switching in autoregressive models." Econometric Reviews, 36(6-9), 713-727.