LaMa: Fast Numerical Maximum Likelihood Estimation for Latent Markov Models

The class of latent Markov models, including hidden Markov models, hidden semi-Markov models, state space models, and point processes, is a very popular and powerful framework for inference of time series driven by latent processes. Furthermore, all these models can be fitted using direct numerical maximum likelihood estimation using the so-called forward algorithm as discussed in Zucchini et al. (2016) <doi:10.1201/b20790>. However, due to their great flexibility, researchers using these models in applied work often need to build highly customized models for which standard software implementation is lacking, or the construction of such models in said software is as complicated as writing fully tailored 'R' code. While providing greater flexibility and control, the latter suffers from slow estimation speeds that make custom solutions inconvenient. We address the above issues in two ways. First, standard blocks of code, common to all these model classes, are implemented as simple-to-use functions that can be added like Lego blocks to an otherwise fully custom likelihood function, making writing custom code much easier. Second, under the hood, these functions are written in 'C++', allowing for 10-20 times faster evaluation time, and thus drastically speeding up model estimation. To aid in building fully custom likelihood functions, several vignettes are included that show how to simulate data from and estimate all the above model classes.

Version: 1.0.0
Depends: R (≥ 3.5.0)
Imports: Rcpp, mgcv
LinkingTo: Rcpp, RcppArmadillo
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0), PHSMM
Published: 2024-06-04
DOI: 10.32614/CRAN.package.LaMa
Author: Jan-Ole Koslik ORCID iD [aut, cre]
Maintainer: Jan-Ole Koslik <jan-ole.koslik at uni-bielefeld.de>
License: GPL-3
URL: https://janoleko.github.io/software/, https://github.com/janoleko/LaMa
NeedsCompilation: yes
Materials: README
CRAN checks: LaMa results

Documentation:

Reference manual: LaMa.pdf
Vignettes: Continuous-time_HMMs
Hidden semi-Markov models
Inhomogeneous HMMs
Introduction to LaMa
Longitudinal data
MMMPPs
Periodic HMMs
State space models

Downloads:

Package source: LaMa_1.0.0.tar.gz
Windows binaries: r-devel: LaMa_1.0.0.zip, r-release: LaMa_1.0.0.zip, r-oldrel: LaMa_1.0.0.zip
macOS binaries: r-release (arm64): LaMa_1.0.0.tgz, r-oldrel (arm64): LaMa_1.0.0.tgz, r-release (x86_64): LaMa_1.0.0.tgz, r-oldrel (x86_64): LaMa_1.0.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=LaMa to link to this page.