IDEAS home Printed from https://ideas.repec.org/p/bca/bocawp/26-7.html

MSTest: An R-Package for Testing Markov Switching Models

Author

Listed:
  • Gabriel Rodriguez Rondon
  • Jean-Marie Dufour

Abstract

We present the R package MSTest, which implements hypothesis testing procedures to determine the number of regimes in Markov switching models. These models have wide ranging applications in economics, finance, and many other fields. MSTest provides several testing frameworks, including Monte Carlo likelihood ratio tests (Rodriguez-Rondon and Dufour (2025)), moment-based tests (Dufour and Luger (2017)), parameter stability tests (Carrasco et al. (2014)), and classical likelihood ratio procedures (Hansen (1992)). In addition, the package offers tools for simulating and estimating univariate and multivariate Markov switching and hidden Markov models using either the expectation–maximization algorithm or maximum likelihood estimation. The functionality of the package is demonstrated through simulation-based examples.

Suggested Citation

  • Gabriel Rodriguez Rondon & Jean-Marie Dufour, 2026. "MSTest: An R-Package for Testing Markov Switching Models," Staff Working Papers 26-7, Bank of Canada.
  • Handle: RePEc:bca:bocawp:26-7
    DOI: 10.34989/swp-2026-7
    as

    Download full text from publisher

    File URL: https://doi.org/10.34989/swp-2026-7
    File Function: Abstract
    Download Restriction: no

    File URL: https://www.bankofcanada.ca/wp-content/uploads/2026/03/swp2026-7.pdf
    File Function: Full text
    Download Restriction: no

    File URL: https://libkey.io/10.34989/swp-2026-7?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;
    ;

    JEL classification:

    • C12 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General - - - Hypothesis Testing: General
    • C15 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General - - - Statistical Simulation Methods: General
    • C18 - Mathematical and Quantitative Methods - - Econometric and Statistical Methods and Methodology: General - - - Methodolical Issues: General
    • C63 - Mathematical and Quantitative Methods - - Mathematical Methods; Programming Models; Mathematical and Simulation Modeling - - - Computational Techniques
    • C87 - Mathematical and Quantitative Methods - - Data Collection and Data Estimation Methodology; Computer Programs - - - Econometric Software

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:bca:bocawp:26-7. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: the person in charge (email available below). General contact details of provider: https://edirc.repec.org/data/bocgvca.html .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.