hmmTMB1.1.0 package

Fit Hidden Markov Models using Template Model Builder

as_character_formula

Read formula with as.character without splitting

as_sparse

Transforms matrix to dgTMatrix

bdiag_check

Create block diagonal matrix (safe version)

check_contiguous

Check values in vector are contiguous

cov_grid

Grid of covariates

Dist

R6 class for probability distribution

dvm

Density function of von Mises distribution

dwrpcauchy

Density function of wrapped Cauchy distribution

find_re

Find s(, bs = "re") terms in formula

gdeterminant

Generalized matrix determinant

HMM

R6 class for hidden Markov model

hmmTMB_cols

hmmTMB colour palette

hmmTMB-package

hmmTMB: Fit Hidden Markov Models using Template Model Builder

invmlogit

Multivarite inverse logit function

is_whole_number

Check if number of whole number

logLik.HMM

logLik function for SDE objects

logsumexp

Log of sum of exponentials

make_cov

Make covariance matrix from standard deviations and correlations

make_formulas

Process formulas and store in nested list

make_matrices

Create model matrices

MarkovChain

R6 class for HMM hidden process model

mlogit

Multivariate logit function

mvnorm_invlink

Multivariate Normal inverse link function

mvnorm_link

Multivariate Normal link function

na_fill

Fill in NAs

Observation

R6 class for HMM observation model

prec_to_cov

Get covariance matrix from precision matrix

quad_pos_solve

Solve for positive root of quadratic ax^2 + bx + c = 0 when it exists

rvm

Sample from von Mises distribution

rwrpcauchy

Sample from wrapped Cauchy distribution

strip_comments

Strip comments marked with a hash from a character vector

update.HMM

Update a model to a new model by changing one formula

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 (2022) <doi:10.48550/arXiv.2211.14139>.