This function simulates the sample distribution under the null hypothesis. When pre-drawn innovations are provided (for fixed-error MMC per Dufour 2006, Prop. 4.2), uses a buffer loop where each innovation is tried once; failed draws skip to the next slot. Falls back to fresh random draws if the buffer is exhausted.
LR_samp_dist(
mdl_h0,
k1,
N,
burnin,
Z,
mdl_h0_control,
mdl_h1_control,
predrawn_eps = NULL,
predrawn_state_rand = NULL
)vector of simulated LRT statistics
List with restricted model properties.
integer specifying the number of regimes under the alternative hypothesis.
integer specifying the number of replications.
integer specifying the number of observations to drop from beginning of simulation.
List with controls/options used to estimate restricted model.
List with controls/options used to estimate unrestricted model.
Optional list of pre-drawn standard normal matrices for fixed-error simulation.
Each element is a (T+burnin) x q matrix. Default is NULL (generate fresh draws).
Optional (T+burnin) x N_buffer matrix of pre-drawn U[0,1] values
for state transitions (only used when null model has k > 1). Default is NULL.
Rodriguez-Rondon, G., & Dufour, J.-M. 2026a. "Monte Carlo Likelihood-Ratio Tests for Markov Switching Models." Bank of Canada Staff Working Paper, No. 2026-23. doi: 10.34989/swp-2026-23.
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.