Learn R Programming

moveHMM

An R package for analysing animal movement with hidden Markov models.

Get started with the vignettes:

Installation instructions

Stable release

The package is available on CRAN. To install it from CRAN, you can use the following command:

install.packages("moveHMM")

Install from Github

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

devtools::install_github("TheoMichelot/moveHMM", build_vignettes = TRUE)

References

Michelot, T., Langrock, R., Patterson, T.A. (2016). moveHMM: An R package for analysing animal movement data using hidden Markov models. Methods in Ecology and Evolution. 7(11), 1308-1315.

Langrock, R., King, R., Matthiopoulos, J., Thomas, L., Fortin, D., & Morales, J. M. (2012). Flexible and practical modeling of animal telemetry data: hidden Markov models and extensions. Ecology, 93(11), 2336-2342.

Patterson, T. A., Basson, M., Bravington, M. V., & Gunn, J. S. (2009). Classifying movement behaviour in relation to environmental conditions using hidden Markov models. Journal of Animal Ecology, 78(6), 1113-1123.

Copy Link

Version

Install

install.packages('moveHMM')

Monthly Downloads

4,461

Version

1.12

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Theo Michelot

Last Published

October 6th, 2025

Functions in moveHMM (1.12)

is.moveHMM

Is moveHMM
w2n

Scaling function: working to natural parameters
example

Example dataset
plotSat

Plot observations on satellite image
plotStates

Plot states
moveData

Constructor of moveData objects
fitHMM

Fit an HMM to the data
viterbi

Viterbi algorithm
logBeta

Backward log-probabilities
turnAngle

Turning angle
logAlpha

Forward log-probabilities
rvm

Sample from von Mises distribution
predictStationary

Predict stationary state probabilities
rwrpcauchy

Sample from wrapped Cauchy distribution
plotStationary

Plot stationary state probabilities
nLogLike

Negative log-likelihood function
dweibull_rcpp

Weibull density function
dwrpcauchy_rcpp

Wrapped Cauchy density function
dwrpcauchy

Density function of wrapped Cauchy distribution
dvm_rcpp

Von Mises density function
parDef

Parameters definition
n2w

Scaling function: natural to working parameters.
nLogLike_rcpp

Negative log-likelihood
plot.moveHMM

Plot moveHMM
plotPR

Plot pseudo-residuals
stationary

Stationary state probabilities
prepData

Preprocessing of the tracking data
stateProbs

State probabilities
predictTPM

Predict transition probabilities for new covariate values
splitAtGaps

Split track at gaps
plot.moveData

Plot moveData
simData

Simulation tool
AIC.moveHMM

AIC
dvm

Density function of von Mises distribution
allProbs

Matrix of all probabilities
angleCI

Confidence intervals for angle parameters
CI

Confidence intervals
dexp_rcpp

Exponential density function
dgamma_rcpp

Gamma density function
dlnorm_rcpp

Log-normal density function
getPlotData

Data to produce plots of fitted model
is.moveData

Is moveData
haggis_data

Wild haggis data set from Michelot et al. (2016, Methods Eco Evol)
getPalette

Discrete colour palette for states
elk_data

Elk data set from Morales et al. (2004, Ecology)
exGen

Example data simulation
moveHMM

Constructor of moveHMM objects
print.moveHMM

Print moveHMM
pseudoRes

Pseudo-residuals
trMatrix_rcpp

Transition probability matrix
summary.moveData

Summary moveData