Package: hmmTMB 1.1.2

hmmTMB: Fit Hidden Markov Models using Template Model Builder

Fitting hidden Markov models using automatic differentiation and Laplace approximation, allowing for fast inference and flexible covariate effects (including random effects and smoothing splines) on model parameters. The package is described by Michelot (2025) <doi:10.18637/jss.v114.i05>.

Authors:Theo Michelot [aut, cre], Richard Glennie [aut, ctb]

hmmTMB_1.1.2.tar.gz
hmmTMB_1.1.2.zip(r-4.7)hmmTMB_1.1.2.zip(r-4.6)hmmTMB_1.1.2.zip(r-4.5)
hmmTMB_1.1.2.tgz(r-4.6-x86_64)hmmTMB_1.1.2.tgz(r-4.6-arm64)hmmTMB_1.1.2.tgz(r-4.5-x86_64)hmmTMB_1.1.2.tgz(r-4.5-arm64)
hmmTMB_1.1.2.tar.gz(r-4.7-arm64)hmmTMB_1.1.2.tar.gz(r-4.7-x86_64)hmmTMB_1.1.2.tar.gz(r-4.6-arm64)hmmTMB_1.1.2.tar.gz(r-4.6-x86_64)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
hmmTMB/json (API)

# Install 'hmmTMB' in R:
install.packages('hmmTMB', repos = c('https://theomichelot.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/theomichelot/hmmtmb/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

Conda:

hidden-markov-modelhmmmixed-effects-modelsrandom-effectssmoothing-splinestime-series-analysiscpp

7.43 score 68 stars 123 scripts 442 downloads 15 exports 56 dependencies

Last updated from:ce29b6b207. Checks:11 WARNING, 1 ERROR, 1 FAIL. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64WARNING327
linux-devel-x86_64WARNING348
source / vignettesERROR670
linux-release-arm64WARNING321
linux-release-x86_64WARNING367
macos-release-arm64WARNING322
macos-release-x86_64WARNING475
macos-oldrel-arm64WARNING398
macos-oldrel-x86_64WARNING685
windows-develWARNING378
windows-releaseWARNING364
windows-oldrelWARNING356
wasm-releaseFAIL161

Exports:as_character_formulaDistHMMinvmlogitis_whole_numberlogsumexpmake_formulasMarkovChainmlogitmvnorm_invlinkmvnorm_linkObservationprec_to_covquad_pos_solvestrip_comments

Dependencies:abindbackportsBHcallrcheckmateclicpp11descdistributionalfarvergenericsggplot2gluegridExtragtableinlineisobandlabelinglatticelifecycleloomagrittrMASSMatrixmatrixStatsmgcvnlmenumDerivotelpillarpkgbuildpkgconfigposteriorprocessxpsQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelrlangrstanS7scalesStanHeadersstringistringrtensorAtibbleTMBtmbstanutf8vctrsviridisLitewithr

Readme and manuals

Help Manual

Help pageTopics
Read formula with as.character without splittingas_character_formula
Transforms matrix to dgTMatrixas_sparse
Create block diagonal matrix (safe version)bdiag_check
Check values in vector are contiguouscheck_contiguous
Check that only supported smooths are usedcheck_smooths
Grid of covariatescov_grid
R6 class for probability distributionDist
Density function of von Mises distributiondvm
Density function of wrapped Cauchy distributiondwrpcauchy
Find s(, bs = "re") terms in formulafind_re
Generalized matrix determinantgdeterminant
R6 class for hidden Markov modelHMM
hmmTMB colour palettehmmTMB_cols
Multivarite inverse logit functioninvmlogit
Check if number of whole numberis_whole_number
logLik function for SDE objectslogLik.HMM
Log of sum of exponentialslogsumexp
Make covariance matrix from standard deviations and correlationsmake_cov
Process formulas and store in nested listmake_formulas
Create model matricesmake_matrices
R6 class for HMM hidden process modelMarkovChain
Multivariate logit functionmlogit
Multivariate Normal inverse link functionmvnorm_invlink
Multivariate Normal link functionmvnorm_link
Fill in NAsna_fill
R6 class for HMM observation modelObservation
Get covariance matrix from precision matrixprec_to_cov
Solve for positive root of quadratic ax^2 + bx + c = 0 when it existsquad_pos_solve
Sample from von Mises distributionrvm
Sample from wrapped Cauchy distributionrwrpcauchy
Strip comments marked with a hash from a character vectorstrip_comments
Update a model to a new model by changing one formulaupdate.HMM