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

643

Version

1.10

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Theo Michelot

Last Published

April 7th, 2025

Functions in moveHMM (1.10)

getPalette

Discrete colour palette for states
getPlotData

Data to produce plots of fitted model
logAlpha

Forward log-probabilities
is.moveData

Is moveData
fitHMM

Fit an HMM to the data
moveHMM

Constructor of moveHMM objects
nLogLike

Negative log-likelihood function
n2w

Scaling function: natural to working parameters.
simData

Simulation tool
plotStationary

Plot stationary state probabilities
splitAtGaps

Split track at gaps
predictStationary

Predict stationary state probabilities
plot.moveHMM

Plot moveHMM
plotPR

Plot pseudo-residuals
plotSat

Plot observations on satellite image
plotStates

Plot states
moveData

Constructor of moveData objects
logBeta

Backward log-probabilities
exGen

Example data simulation
print.moveHMM

Print moveHMM
parDef

Parameters definition
nLogLike_rcpp

Negative log-likelihood
plot.moveData

Plot moveData
pseudoRes

Pseudo-residuals
predictTPM

Predict transition probabilities for new covariate values
prepData

Preprocessing of the tracking data
stateProbs

State probabilities
turnAngle

Turning angle
w2n

Scaling function: working to natural parameters
trMatrix_rcpp

Transition probability matrix
summary.moveData

Summary moveData
stationary

Stationary state probabilities
viterbi

Viterbi algorithm
allProbs

Matrix of all probabilities
dlnorm_rcpp

Log-normal density function
dexp_rcpp

Exponential density function
angleCI

Confidence intervals for angle parameters
CI

Confidence intervals
dweibull_rcpp

Weibull density function
dwrpcauchy_rcpp

Wrapped Cauchy density function
dvm_rcpp

Von Mises density function
dgamma_rcpp

Gamma density function
AIC.moveHMM

AIC
haggis_data

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

Example dataset
elk_data

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

Is moveHMM