We present the R package MSTest, which implements hypothesis testing procedures to identify the number of regimes in Markov switching models. These models have wide-ranging applications in economics, finance, and numerous other fields. The MSTest package includes the Monte Carlo likelihood ratio test procedures proposed by Rodriguez-Rondon and Dufour (2024), the moment-based tests of Dufour and Luger (2017), the parameter stability tests of Carrasco, Hu, and Ploberger (2014), and the likelihood ratio test of Hansen (1992). Additionally, the package enables users to simulate and estimate univariate and multivariate Markov switching and hidden Markov processes, using the expectation-maximization (EM) algorithm or maximum likelihood estimation (MLE). We demonstrate the functionality of the MSTest package through both simulation experiments and an application to U.S. GNP growth data.
翻译:本文介绍R软件包MSTest,该软件包实现了用于识别马尔可夫转换模型中区制数量的假设检验程序。此类模型在经济学、金融学及众多其他领域具有广泛应用。MSTest软件包包含Rodriguez-Rondon与Dufour(2024)提出的蒙特卡洛似然比检验程序、Dufour与Luger(2017)的矩检验方法、Carrasco、Hu与Ploberger(2014)的参数稳定性检验,以及Hansen(1992)的似然比检验。此外,该软件包支持用户通过期望最大化(EM)算法或最大似然估计(MLE)方法,对单变量与多变量马尔可夫转换过程及隐马尔可夫过程进行模拟与估计。我们通过模拟实验及对美国GNP增长数据的应用分析,展示了MSTest软件包的功能特性。