Skip to content

LaMa

Fast Numerical Maximum Likelihood Estimation for Latent Markov Models

v2.1.0 · Mar 16, 2026 · MIT + file LICENSE

Description

A variety of latent Markov models, including hidden Markov models, hidden semi-Markov models, state-space models and continuous-time variants can be formulated and estimated within the same framework via directly maximising the likelihood function using the so-called forward algorithm. Applied researchers often need custom models that standard software does not easily support. Writing tailored 'R' code offers flexibility but suffers from slow estimation speeds. We address these issues by providing easy-to-use functions (written in 'C++' for speed) for common tasks like the forward algorithm. These functions can be combined into custom models in a Lego-type approach, offering up to 10-20 times faster estimation via standard numerical optimisers. 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.

Downloads

540

Last 30 days

7456th

962

Last 90 days

3.1K

Last year

Trend: +158.4% (30d vs prior 30d)

CRAN Check Status

3 NOTE
11 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 NOTE
r-oldrel-macos-x86_64 NOTE
r-oldrel-windows-x86_64 NOTE
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (3 non-OK)
NOTE r-oldrel-macos-arm64

installed package size

installed size is  7.9Mb
  sub-directories of 1Mb or more:
    doc    3.1Mb
    libs   3.4Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  8.0Mb
  sub-directories of 1Mb or more:
    doc    3.1Mb
    libs   3.6Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  5.7Mb
  sub-directories of 1Mb or more:
    doc    3.1Mb
    libs   1.3Mb

Check History

NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-oldrel-macos-arm64

installed package size

installed size is  7.9Mb
  sub-directories of 1Mb or more:
    doc    3.1Mb
    libs   3.4Mb
NOTE r-oldrel-macos-x86_64

installed package size

installed size is  8.0Mb
  sub-directories of 1Mb or more:
    doc    3.1Mb
    libs   3.5Mb
NOTE r-oldrel-windows-x86_64

installed package size

installed size is  5.7Mb
  sub-directories of 1Mb or more:
    doc    3.1Mb
    libs   1.3Mb

Reverse Dependencies (1)

suggests

Dependency Network

Dependencies Reverse dependencies RTMB Rcpp Matrix splines2 mgcv MASS numDeriv RTMBdist RTMBdist LaMa

Version History

updated 2.1.0 ← 2.0.6 diff Mar 16, 2026
new 2.0.6 Mar 10, 2026
updated 2.0.6 ← 2.0.5 diff Sep 22, 2025
updated 2.0.5 ← 2.0.4 diff Jun 14, 2025
updated 2.0.4 ← 2.0.3 diff Jun 4, 2025
updated 2.0.3 ← 2.0.2 diff Jan 28, 2025
updated 2.0.2 ← 2.0.1 diff Nov 19, 2024
updated 2.0.1 ← 2.0.0 diff Nov 12, 2024
updated 2.0.0 ← 1.0.0 diff Nov 11, 2024
new 1.0.0 Jun 3, 2024