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

514

Version

1.5.5

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Brett T McClintock

Last Published

October 18th, 2022

Functions in momentuHMM (1.5.5)

MIpool

Calculate pooled parameter estimates and states across multiple imputations
HMMfits

Constructor of HMMfits objects
XBloop_rcpp

Get XB
AIC.momentuHMM

AIC
MIfitHMM

Fit HMMs to multiple imputation data
CIbeta

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

Matrix of all probabilities
checkPar0

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

Calculate Akaike information criterion model weights
CIreal

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

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

Constructor of crwHierData 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
dbern_rcpp

Bernoulli density function
crwSim

Constructor of crwSim objects
crwHierSim

Constructor of crwHierSim objects
dlnorm_rcpp

Log-normal density function
dexp_rcpp

Exponential density function
dgamma_rcpp

Gamma density function
distAngle

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

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

negative binomial density function
dpois_rcpp

Poisson density function
dnorm_rcpp

Normal density function
dcat_rcpp

Categorical density function
dbeta_rcpp

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

Constructor of crwData objects
crawlWrap

Fit and predict tracks for using crawl
dt_rcpp

student t density function
dlogis_rcpp

logistic density function
dwrpcauchy_rcpp

Wrapped Cauchy density function
getDM_rcpp

Get design matrix
getCovNames

Get names of any covariates used in probability distribution parameters
fitHMM

Fit a multivariate HMM to the data
exampleData

Example dataset
expandPar

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

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

Convert hierarchical HMM structure to a conventional HMM
dvm_rcpp

Von Mises density function
dweibull_rcpp

Weibull density function
is.miHMM

Is miHMM
is.crwHierData

Is crwHierData
getPar0

Get starting values for new model from existing momentuHMM or momentuHierHMM model fit
is.crwHierSim

Is crwHierSim
is.miSum

Is miSum
getParDM

Get starting values on working scale based on design matrix and other parameter constraints
is.HMMfits

Is HMMfits
getTrProbs

Transition probability matrix
is.crwSim

Is crwSim
is.crwData

Is crwData
momentuHMM

Constructor of momentuHMM objects
miSum

Constructor of miSum objects
is.momentuHierHMM

Is momentuHierHMM
is.momentuHMMData

Is momentuHMMData
is.momentuHMM

Is momentuHMM
miHMM

Constructor of miHMM objects
mixtureProbs

Mixture probabilities
is.momentuHierHMMData

Is momentuHierHMMData
logBeta

Backward log-probabilities
logAlpha

Forward log-probabilities
momentuHMMData

Constructor of momentuHMMData objects
parDef

Parameters definition
momentuHierHMMData

Constructor of momentuHierHMMData objects
nLogLike_rcpp

Negative log-likelihood
momentuHierHMM

Constructor of momentuHierHMM objects
nLogLike

Negative log-likelihood function
plot.crwData

Plot crwData
plot.miSum

Plot miSum
n2w

Scaling function: natural to working parameters.
plot.miHMM

Plot miHMM
plotStationary

Plot stationary state probabilities
prepData

Preprocessing of the data streams and covariates
plotPR

Plot pseudo-residuals
print.miSum

Print miSum
print.miHMM

Print miHMM
plot.momentuHMMData

Plot momentuHMMData or momentuHierHMMData
plot.momentuHMM

Plot momentuHMM
plotSpatialCov

Plot observations on raster image
plotStates

Plot states
plotSat

Plot observations on satellite image
randomEffects

Random effects estimation
simObsData

Observation error simulation tool
summary.momentuHMMData

Summary momentuHMMData
print.momentuHMM

Print momentuHMM
setModelName

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

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

Stationary state probabilities
stateProbs

State probabilities
simData

Simulation tool
pseudoRes

Pseudo-residuals
trMatrix_rcpp

Transition probability matrix
w2n

Scaling function: working to natural parameters
timeInStates

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

Turning angle
viterbi

Viterbi algorithm