Package: LaMa 2.1.1

Jan-Ole Fischer
LaMa: Fast Numerical Maximum Likelihood Estimation for Latent Markov Models
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.
Authors:
LaMa_2.1.1.tar.gz
LaMa_2.1.1.tar.gz(r-4.7-arm64)LaMa_2.1.1.tar.gz(r-4.7-x86_64)LaMa_2.1.1.tar.gz(r-4.6-arm64)LaMa_2.1.1.tar.gz(r-4.6-x86_64)
LaMa_2.1.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
card.svg |card.png
LaMa/json (API)
NEWS
| # Install 'LaMa' in R: |
| install.packages('LaMa', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/janolefi/lama/issues
Pkgdown/docs site:https://janolefi.github.io
Last updated from:941bd3ba96. Checks:6 OK. Indexed: no.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-arm64 | OK | 180 | ||
| linux-devel-x86_64 | OK | 462 | ||
| source / vignettes | OK | 351 | ||
| linux-release-arm64 | OK | 184 | ||
| linux-release-x86_64 | OK | 192 | ||
| wasm-release | OK | 139 |
Exports:%sp%calc_trackIndcosinorddwelldgamma2dgmrf2dskewnormdvmdwrpcauchyforwardforward_gforward_hsmmforward_ihsmmforward_pforward_phsmmforward_sforward_spgeneratorgenerator_gLaMaColorsmake_matricesmake_matrices_densmake_matrices_oldmax0_smoothmax2MCreportmin0_smoothmin2penaltypenalty_unipenalty2pgamma2pred_matrixprocess_hid_formulaspseudo_respskewnormpvmqgamma2qremlqreml_oldqskewnormreportrgamma2rskewnormrvmrwrpcauchysdreport_outersdreportMCsmooth_dens_constructstateprobsstateprobs_gstateprobs_pstationarystationary_contstationary_ctstationary_pstationary_p_sparsestationary_sparsetpmtpm_conttpm_cttpm_embtpm_emb_gtpm_gtpm_g2tpm_hsmmtpm_hsmm2tpm_ihsmmtpm_ptpm_phsmmtpm_phsmm2tpm_thinnedviterbiviterbi_gviterbi_pzero_inflate
Dependencies:bootcircularclueclustergamlss.distlatticeMASSMatrixMatrixModelsmgcvmnormtmovMFmvtnormnlmenumDerivquantregRcppRcppArmadilloRcppEigenRTMBRTMBdistskmeansslamsnSparseMsplines2statmodsurvivalTMB
6 Continuous-time HMMs
Rendered fromContinuous_time_HMMs.Rmdusingknitr::rmarkdownon Jun 12 2026.Last update: 2026-05-13
Started: 2024-06-05
9 Hidden semi-Markov models
Rendered fromHSMMs.Rmdusingknitr::rmarkdownon Jun 12 2026.Last update: 2026-05-13
Started: 2024-06-05
1 Introduction to LaMa
Rendered fromIntro_to_LaMa.Rmdusingknitr::rmarkdownon Jun 12 2026.Last update: 2026-05-13
Started: 2024-06-05
2 Automatic differentiation via RTMB
Rendered fromLaMa_and_RTMB.Rmdusingknitr::rmarkdownon Jun 12 2026.Last update: 2026-05-13
Started: 2024-11-12
4 Longitudinal data
Rendered fromLongitudinal_data.Rmdusingknitr::rmarkdownon Jun 12 2026.Last update: 2026-05-13
Started: 2024-06-05
7 Markov-modulated (marked) Poisson processes
Rendered fromMMMPPs.Rmdusingknitr::rmarkdownon Jun 12 2026.Last update: 2026-05-13
Started: 2024-06-05
3 Extensions of the basic model structure
Rendered fromExtensions.Rmdusingknitr::rmarkdownon Jun 12 2026.Last update: 2026-05-13
Started: 2026-05-13
5 Penalised splines
Rendered fromPenalised_splines.Rmdusingknitr::rmarkdownon Jun 12 2026.Last update: 2026-05-13
Started: 2024-11-12
8 State-space models
Rendered fromState_space_models.Rmdusingknitr::rmarkdownon Jun 12 2026.Last update: 2026-05-13
Started: 2024-06-05