Package: MSTest 0.1.4.9000

Gabriel Rodriguez Rondon

MSTest: Hypothesis Testing for Markov Switching Models

Implementation of hypothesis testing procedures described in Hansen (1992) <doi:10.1002/jae.3950070506>, Carrasco, Hu, & Ploberger (2014) <doi:10.3982/ECTA8609>, Dufour & Luger (2017) <doi:10.1080/07474938.2017.1307548>, and Rodriguez Rondon & Dufour (2024) <https://grodriguezrondon.com/files/RodriguezRondon_Dufour_2024_MonteCarlo_LikelihoodRatioTest_MarkovSwitchingModels_20241015.pdf> that can be used to identify the number of regimes in Markov switching models.

Authors:Gabriel Rodriguez Rondon [cre, aut], Jean-Marie Dufour [aut]

MSTest_0.1.4.9000.tar.gz
MSTest_0.1.4.9000.zip(r-4.5)MSTest_0.1.4.9000.zip(r-4.4)MSTest_0.1.4.9000.zip(r-4.3)
MSTest_0.1.4.9000.tgz(r-4.4-x86_64)MSTest_0.1.4.9000.tgz(r-4.4-arm64)MSTest_0.1.4.9000.tgz(r-4.3-x86_64)MSTest_0.1.4.9000.tgz(r-4.3-arm64)
MSTest_0.1.4.9000.tar.gz(r-4.5-noble)MSTest_0.1.4.9000.tar.gz(r-4.4-noble)
MSTest_0.1.4.9000.tgz(r-4.4-emscripten)MSTest_0.1.4.9000.tgz(r-4.3-emscripten)
MSTest.pdf |MSTest.html
MSTest/json (API)
NEWS

# Install 'MSTest' in R:
install.packages('MSTest', repos = c('https://roga11.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/roga11/mstest/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • USGNP - US GNP data 1947Q2 - 2024Q2
  • USRGDP - US Real GDP data 1947Q2 - 2024Q2
  • chp10GNP - Carrasco, Hu, & Ploberger 2010 GNP data
  • hamilton84GNP - Hamilton 1984 & Hansen 1992 GNP data

On CRAN:

autoregressivebootstraphypothesis-testinglikelihood-ratio-testmarkov-chainmomentsmonte-carlonon-linearregime-switchingtime-series

3.40 score 2 scripts 571 downloads 130 exports 14 dependencies

Last updated 9 days agofrom:f1d80f8601. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 14 2024
R-4.5-win-x86_64OKNov 14 2024
R-4.5-linux-x86_64OKNov 14 2024
R-4.4-win-x86_64OKNov 14 2024
R-4.4-mac-x86_64OKNov 14 2024
R-4.4-mac-aarch64OKNov 14 2024
R-4.3-win-x86_64OKNov 14 2024
R-4.3-mac-x86_64OKNov 14 2024
R-4.3-mac-aarch64OKNov 14 2024

Exports:approx_dist_loopapproxDistDLargrid_MSARmdlargrid_MSVARmdlARmdlarPARXmdlcalc_DLmomentscalc_mu2tcalc_mu2t_mvcalcResid_MSARmdlcalcResid_MSARXmdlcalcResid_MSVARmdlcalcResid_MSVARXmdlCHPbootCVchpDmatchpStatCHPTestclikecombine_statcompanionMatcompu_tstatcov2corrcovar_unvechcovar_vechDLMCTestDLMMC_boundsDLMMCpval_funDLMMCpval_fun_minDLMMCTestdmclikeEMaximization_HMmdlEMaximization_MSARmdlEMaximization_MSARXmdlEMaximization_MSVARmdlEMaximization_MSVARXmdlEMiter_HMmdlEMiter_MSARmdlEMiter_MSARXmdlEMiter_MSVARmdlEMiter_MSVARXmdlestimMdlExpectationM_HMmdlExpectationM_MSARmdlExpectationM_MSARXmdlExpectationM_MSVARmdlExpectationM_MSVARXmdlgetHessianHLRparamSearchHLRTestHMmdlHMmdl_emHMmdl_mleinitVals_HMmdlinitVals_MSARmdlinitVals_MSARXmdlinitVals_MSVARmdlinitVals_MSVARXmdlinterMSARmdlinterMSVARmdllimPLMCLRTestlogLike_ARmdllogLike_ARXmdllogLike_HMmdllogLike_HMmdl_minlogLike_MSARmdllogLike_MSARmdl_minlogLike_MSARXmdllogLike_MSARXmdl_minlogLike_MSVARmdllogLike_MSVARmdl_minlogLike_MSVARXmdllogLike_MSVARXmdl_minlogLike_NmdllogLike_VARmdllogLike_VARXmdlLR_samp_distLR_samp_dist_parmarklikemclikeMCpvalmdleditMMC_boundsMMCLRpval_funMMCLRpval_fun_minMMCLRTestMSARmdlMSARmdl_emMSARmdl_mleMSARXmdlMSARXmdl_emMSVARmdlMSVARmdl_emMSVARmdl_mleMSVARXmdlMSVARXmdl_emNmdlparamList_MSARmdlparamList_MSARXmdlparamList_MSVARmdlparamList_MSVARXmdlrandPrandSNsim_DLmomentssimuARsimuAR_cppsimuARXsimuARX_cppsimuHMMsimuHMM_cppsimuMdlsimuMSARsimuMSAR_cppsimuMSARXsimuMSARX_cppsimuMSVARsimuMSVAR_cppsimuMSVARXsimuMSVARX_cppsimuNormsimuNorm_cppsimuVARsimuVAR_cppsimuVARXsimuVARX_cppthetaSEts_laggedVARmdlVARXmdl

Dependencies:clicodetoolscrayonforeachGAGenSAiteratorsnloptrnumDerivpracmapsoRcppRcppArmadillorlang

Readme and manuals

Help Manual

Help pageTopics
Testing Markov Switching ModelsMSTest-package MSTest
Autoregressive ModelARmdl
Autoregressive X ModelARXmdl
Carrasco, Hu, & Ploberger 2010 GNP datachp10GNP
Bootstrap critical values for CHP 2014 parameter stability testCHPbootCV
Carrasco, Hu, and Ploberger (2014) parameter stability testCHPTest
Monte Carlo moment-based test for Markov switching modelDLMCTest
Maximized Monte Carlo moment-based test for Markov switching modelDLMMCTest
Hamilton 1984 & Hansen 1992 GNP datahamilton84GNP
Hansen (1992) likelihood ratio testHLRTest
Hidden Markov modelHMmdl
Monte Carlo Likelihood Ratio TestLMCLRTest
Monte Carlo P-valueMCpval
Maximized Monte Carlo Likelihood Ratio TestMMCLRTest
Markov-switching autoregressive modelMSARmdl
Markov-switching autoregressive modelMSARXmdl
Markov-switching vector autoregressive modelMSVARmdl
Markov-switching vector autoregressive modelMSVARXmdl
Normal distribution modelNmdl
Simulate autoregressive processsimuAR
Simulate autoregressive X processsimuARX
Simulate Hidden Markov model with normally distributed errorssimuHMM
Simulate Markov-switching autoregressive processsimuMSAR
Simulate Markov-switching ARX processsimuMSARX
Simulate Markov-switching vector autoregressive processsimuMSVAR
Simulate Markov-switching VARX processsimuMSVARX
Simulate normally distributed processsimuNorm
Simulate VAR processsimuVAR
Simulate VAR processsimuVARX
US GNP data 1947Q2 - 2024Q2USGNP
US Real GDP data 1947Q2 - 2024Q2USRGDP
Vector autoregressive modelVARmdl
Vector X autoregressive modelVARXmdl