Package: MSTest 0.1.3

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 (2022) <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.3.tar.gz
MSTest_0.1.3.tar.gz(r-4.5-noble)MSTest_0.1.3.tar.gz(r-4.4-noble)
MSTest_0.1.3.tgz(r-4.4-emscripten)MSTest_0.1.3.tgz(r-4.3-emscripten)
MSTest.pdf |MSTest.html
MSTest/json (API)
NEWS

# Install 'MSTest' in R:
install.packages('MSTest', repos = c('https://cran.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

2.00 score 1 scripts 444 downloads 130 exports 14 dependencies

Last updated 1 months agofrom:138e236f4e. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKOct 31 2024
R-4.5-linux-x86_64OKOct 31 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