Learn R Programming

momentuHMM

R package for Maximum likelihood analysis Of animal MovemENT behavior Using multivariate Hidden Markov Models

Get started with the vignette: Guide to using momentuHMM

Installation instructions

CRAN release

The package is available at . To install it:

install.packages("momentuHMM")

Install from Github

To install the latest (stable) version of the package from Github:

library(remotes)
install_github("bmcclintock/momentuHMM")

To install the latest (unstable) version of the package from Github:

library(remotes)
install_github("bmcclintock/momentuHMM@develop")

References

McClintock, B.T., Michelot, T. (2018) momentuHMM: R package for generalized hidden Markov models of animal movement. Methods in Ecology and Evolution, 9(6), 1518-1530.

McClintock, B.T., King R., Thomas L., Matthiopoulos J., McConnell B.J., Morales J.M. (2012) A general discrete-time modeling framework for animal movement using multistate random walks. Ecological Monographs, 82(3), 335-349.

McClintock, B.T. (2017) Incorporating telemetry error into hidden Markov models of animal movement using multiple imputation. Journal of Agricultural, Biological, and Environmental Statistics, 22(3), 249-269.

Copy Link

Version

Install

install.packages('momentuHMM')

Monthly Downloads

3,895

Version

1.5.7

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Brett T McClintock

Last Published

October 21st, 2025

Functions in momentuHMM (1.5.7)

crwData

Constructor of crwData objects
dbern_rcpp

Bernoulli density function
crawlWrap

Fit and predict tracks for using crawl
crwSim

Constructor of crwSim objects
circAngles

Convert standard direction angles (in radians relative to the x-axis) to turning angle covariates suitable for circular-circular regression on the angle mean
crawlMerge

Merge crwData or crwHierData object with additional data streams and/or covariates
dexp_rcpp

Exponential density function
dgamma_rcpp

Gamma density function
dnorm_rcpp

Normal density function
dnbinom_rcpp

negative binomial density function
crwHierData

Constructor of crwHierData objects
dmvnorm_rcpp

C++ implementation of multivariate Normal probability density function for multiple inputs
crwHierSim

Constructor of crwHierSim objects
dlogis_rcpp

logistic density function
dbeta_rcpp

Probability density function of the beta distribution (written in C++)
dlnorm_rcpp

Log-normal density function
distAngle

Calculate distance between points y and z and turning angle between points x, y, and z
getPar

Get starting values from momentuHMM, miHMM, or miSum object returned by fitHMM, MIfitHMM, or MIpool
getDM_rcpp

Get design matrix
dwrpcauchy_rcpp

Wrapped Cauchy density function
dcat_rcpp

Categorical density function
dt_rcpp

student t density function
dpois_rcpp

Poisson density function
exampleData

Example dataset
is.crwData

Is crwData
is.crwHierData

Is crwHierData
getCovNames

Get names of any covariates used in probability distribution parameters
formatHierHMM

Convert hierarchical HMM structure to a conventional HMM
is.crwHierSim

Is crwHierSim
expandPar

Expand vector of free working parameters to vector of all working parameters including any fixed parameters (used in fitHMM.R and nLogLike.R)
fitHMM

Fit a multivariate HMM to the data
is.momentuHMM

Is momentuHMM
is.momentuHMMData

Is momentuHMMData
is.crwSim

Is crwSim
is.miHMM

Is miHMM
is.miSum

Is miSum
mixtureProbs

Mixture probabilities
nLogLike

Negative log-likelihood function
getTrProbs

Transition probability matrix
momentuHMM

Constructor of momentuHMM objects
nLogLike_rcpp

Negative log-likelihood
is.HMMfits

Is HMMfits
is.momentuHierHMMData

Is momentuHierHMMData
momentuHierHMMData

Constructor of momentuHierHMMData objects
n2w

Scaling function: natural to working parameters.
plot.miHMM

Plot miHMM
is.momentuHierHMM

Is momentuHierHMM
getPar0

Get starting values for new model from existing momentuHMM or momentuHierHMM model fit
plot.miSum

Plot miSum
logAlpha

Forward log-probabilities
plotSpatialCov

Plot observations on raster image
getParDM

Get starting values on working scale based on design matrix and other parameter constraints
plotStates

Plot states
plotPR

Plot pseudo-residuals
plotSat

Plot observations on satellite image
prepData

Preprocessing of the data streams and covariates
plotStationary

Plot stationary state probabilities
stationary

Stationary state probabilities
dvm_rcpp

Von Mises density function
setModelName

Set modelName for a momentuHMM, miHMM, HMMfits, or miSum object
turnAngle

Turning angle
randomEffects

Random effects estimation
plot.momentuHMM

Plot momentuHMM
miSum

Constructor of miSum objects
dweibull_rcpp

Weibull density function
plot.crwData

Plot crwData
pseudoRes

Pseudo-residuals
miHMM

Constructor of miHMM objects
parDef

Parameters definition
w2n

Scaling function: working to natural parameters
print.momentuHMM

Print momentuHMM
plot.momentuHMMData

Plot momentuHMMData or momentuHierHMMData
stateProbs

State probabilities
viterbi

Viterbi algorithm
simObsData

Observation error simulation tool
momentuHMMData

Constructor of momentuHMMData objects
logBeta

Backward log-probabilities
simData

Simulation tool
summary.momentuHMMData

Summary momentuHMMData
momentuHierHMM

Constructor of momentuHierHMM objects
print.miSum

Print miSum
print.miHMM

Print miHMM
trMatrix_rcpp

Transition probability matrix
timeInStates

Calculate proportion of time steps assigned to each state (i.e. “activity budgets”)
setStateNames

Set stateNames for a momentuHMM, miHMM, HMMfits, or miSum object
checkPar0

Check parameter length and order for a fitHMM (or MIfitHMM) model
MIpool

Calculate pooled parameter estimates and states across multiple imputations
AIC.momentuHMM

AIC
HMMfits

Constructor of HMMfits objects
CIbeta

Confidence intervals for working (i.e., beta) parameters
allProbs

Matrix of all probabilities
XBloop_rcpp

Get XB
MIfitHMM

Fit HMMs to multiple imputation data
AICweights

Calculate Akaike information criterion model weights
CIreal

Confidence intervals for the natural (i.e., real) parameters