🤖 AI Summary
The latent Markov modeling community suffers from fragmented formalisms, inconsistent terminology, and disparate inference methods and software tools—severely hindering practical adoption. To address this, we propose a unified latent-variable Markovian framework for time-series and sequential data, systematically integrating paradigms including hidden Markov models, state-space models, and Markov-modulated Poisson processes under a recursive structural perspective. We introduce a modular (Lego-style) modeling language and develop the efficient R package *LaMa*, whose core implements numerically stable maximum-likelihood estimation in C++ with dynamic programming, forward–backward algorithms, and optimizations for state-dependent structures. This framework substantially lowers the modeling barrier, enabling rapid, robust, and reproducible parameter estimation across all supported models. Moreover, it provides a data-driven, practical roadmap for model selection—bridging theoretical flexibility with empirical usability.
📝 Abstract
Statistical models that involve latent Markovian state processes have become immensely popular tools for analysing time series and other sequential data. However, the plethora of model formulations, the inconsistent use of terminology, and the various inferential approaches and software packages can be overwhelming to practitioners, especially when they are new to this area. With this review-like paper, we thus aim to provide guidance for both statisticians and practitioners working with latent Markov models by offering a unifying view on what otherwise are often considered separate model classes, from hidden Markov models over state-space models to Markov-modulated Poisson processes. In particular, we provide a roadmap for identifying a suitable latent Markov model formulation given the data to be analysed. Furthermore, we emphasise that it is key to applied work with any of these model classes to understand how recursive techniques exploiting the models' dependence structure can be used for inference. The R package LaMa adapts this unified view and provides an easy-to-use framework for very fast (C++ based) numerical maximum likelihood estimation of any of the models discussed in this paper, allowing users to tailor a latent Markov model to their data using a Lego-type approach.