EconPapers    
Economics at your fingertips  
 

MSTest: An R-Package for Testing Markov Switching Models

Gabriel Rodriguez Rondon and Jean-Marie Dufour

Staff Working Papers from Bank of Canada

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.

Keywords: Models and tools; Econometric; statistical and computational methods; Economic models; Monetary policy; Real economy and forecasting (search for similar items in EconPapers)
JEL-codes: C12 C15 C18 C63 C87 (search for similar items in EconPapers)
Pages: 53 pages
Date: 2026-03
References: Add references at CitEc
Citations:

Downloads: (external link)
https://doi.org/10.34989/swp-2026-7 Abstract (text/html)
https://www.bankofcanada.ca/wp-content/uploads/2026/03/swp2026-7.pdf Full text (application/pdf)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:bca:bocawp:26-7

Access Statistics for this paper

More papers in Staff Working Papers from Bank of Canada 234 Wellington Street, Ottawa, Ontario, K1A 0G9, Canada. Contact information at EDIRC.
Bibliographic data for series maintained by ().

 
Page updated 2026-07-23
Handle: RePEc:bca:bocawp:26-7