Package: momentuHMM 2.0.0

momentuHMM: Maximum Likelihood Analysis of Animal Movement Behavior Using Multivariate Hidden Markov Models

Extended tools for analyzing telemetry data using generalized hidden Markov models. Features of momentuHMM (pronounced ``momentum'') include data pre-processing and visualization, fitting HMMs to location and auxiliary biotelemetry or environmental data, biased and correlated random walk movement models, discrete- or continuous-time HMMs, continuous- or discrete-space movement models, approximate Langevin diffusion models, hierarchical HMMs, multiple imputation for incorporating location measurement error and missing data, user-specified design matrices and constraints for covariate modelling of parameters, random effects, decoding of the state process, visualization of fitted models, model checking and selection, and simulation. See McClintock and Michelot (2018) <doi:10.1111/2041-210X.12995>.

Authors:Brett McClintock, Theo Michelot

momentuHMM_2.0.0.tar.gz
momentuHMM_2.0.0.zip(r-4.5)momentuHMM_2.0.0.zip(r-4.4)momentuHMM_2.0.0.zip(r-4.3)
momentuHMM_2.0.0.tgz(r-4.4-x86_64)momentuHMM_2.0.0.tgz(r-4.4-arm64)momentuHMM_2.0.0.tgz(r-4.3-x86_64)momentuHMM_2.0.0.tgz(r-4.3-arm64)
momentuHMM_2.0.0.tar.gz(r-4.5-noble)momentuHMM_2.0.0.tar.gz(r-4.4-noble)
momentuHMM.pdf |momentuHMM.html
momentuHMM/json (API)
NEWS

# Install 'momentuHMM' in R:
install.packages('momentuHMM', repos = c('https://bmcclintock.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/bmcclintock/momentuhmm/issues

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

8.28 score 40 stars 132 scripts 543 downloads 6 mentions 44 exports 54 dependencies

Last updated 2 months agofrom:22b8141b69 (on develop). Checks:OK: 7 NOTE: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 12 2024
R-4.5-win-x86_64NOTEOct 12 2024
R-4.5-linux-x86_64NOTEOct 12 2024
R-4.4-win-x86_64OKOct 12 2024
R-4.4-mac-x86_64OKOct 12 2024
R-4.4-mac-aarch64OKOct 12 2024
R-4.3-win-x86_64OKOct 12 2024
R-4.3-mac-x86_64OKOct 12 2024
R-4.3-mac-aarch64OKOct 12 2024

Exports:addSmoothGradientAICweightscheckPar0CIbetacircAnglesCIrealcollapseRastercrawlMergecrawlWrapctdsUDfitCTHMMfitHMMformatHierHMMgetGradientsgetPargetPar0getParDMgetTrProbsMIfitCTHMMMIfitHMMMIpoolmixtureProbsplotPRplotSatplotSpatialCovplotStatesplotStationaryprepCTDSprepDatapseudoResrandomEffectssetModelNamesetStateNamessimCTDSsimCTHMMsimDatasimHierCTDSsimHierCTHMMsimHierDatasimObsDatastateProbsstationarytimeInStatesviterbi

Dependencies:bootBrobdingnagCircStatsclassclassIntclicodetoolscpp11crawlDBIdigestdoParalleldoRNGdplyre1071expmfansiforeachgenericsglueiteratorsKernSmoothlatticelifecyclelubridatemagrittrMASSMatrixmvtnormnumDerivpillarpkgconfigproxypurrrR6rasterRcppRcppArmadilloRcppEigenrlangrngtoolss2sfspterratibbletidyselecttimechangeTMBunitsutf8vctrswithrwk

Guide to using momentuHMM

Rendered frommomentuHMM.pdf.asisusingR.rsp::asison Oct 12 2024.

Last update: 2019-12-17
Started: 2019-12-17

Readme and manuals

Help Manual

Help pageTopics
Add smoothed gradient terms to dataaddSmoothGradient
AICAIC.momentuHMM
Calculate Akaike information criterion model weightsAICweights
Matrix of all probabilitiesallProbs
Check parameter length and order for a 'fitHMM' (or 'MIfitHMM') modelcheckPar0 checkPar0.default checkPar0.hierarchical
Confidence intervals for working (i.e., beta) parametersCIbeta
Convert standard direction angles (in radians relative to the x-axis) to turning angle covariates suitable for circular-circular regression on the angle meancircAngles
Confidence intervals for the natural (i.e., real) parametersCIreal CIreal.default CIreal.hierarchical
Transform a raster into a (x,y,z) listcollapseRaster
Merge crwData or crwHierData object with additional data streams and/or covariatescrawlMerge
Fit and predict tracks for using crawlcrawlWrap
Constructor of 'crwData' objectscrwData
Constructor of 'crwHierData' objectscrwHierData
Constructor of 'crwHierSim' objectscrwHierSim
Constructor of 'crwSim' objectscrwSim
Calculate and plot the (state-dependent) stationary (or utilization) distribution from a 'ctds' fitted model objectctdsUD
Bernoulli density functiondbern_rcpp
Probability density function of the beta distribution (written in C++)dbeta_rcpp
Categorical density functiondcat_rcpp
Correlated random walk Rice distributiondcrwrice_rcpp
Correlated random walk von Mises density functiondcrwvm_rcpp
Exponential density functiondexp_rcpp
Gamma density functiondgamma_rcpp
Calculate distance between points y and z and turning angle between points x, y, and zdistAngle
Log-normal density functiondlnorm_rcpp
logistic density functiondlogis_rcpp
C++ implementation of multivariate Normal probability density function for multiple inputsdmvnorm_rcpp
negative binomial density functiondnbinom_rcpp
Normal density functiondnorm_rcpp
Poisson density functiondpois_rcpp
student t density functiondt_rcpp
Von Mises density functiondvm_rcpp
Weibull density functiondweibull_rcpp
Wrapped Cauchy density functiondwrpcauchy_rcpp
Example datasetexample exampleData forest miExample
Expand vector of free working parameters to vector of all working parameters including any fixed parameters (used in fitHMM.R and nLogLike.R)expandPar
Matrix Exponentialexpmatrix_rcpp
Fit a continuous-time multivariate HMM to the datafitCTHMM fitCTHMM.momentuHierHMMData fitCTHMM.momentuHMMData
Fit a multivariate HMM to the datafitHMM fitHMM.momentuHierHMMData fitHMM.momentuHMMData
Convert hierarchical HMM structure to a conventional HMMformatHierHMM
Get names of any covariates used in probability distribution parametersgetCovNames
Get design matrixgetDM_rcpp
Calculate gradient of spatial covariates using bilinear interpolationgetGradients
Get starting values from momentuHMM, miHMM, or miSum object returned by fitHMM, MIfitHMM, or MIpoolgetPar
Get starting values for new model from existing 'momentuHMM' or 'momentuHierHMM' model fitgetPar0 getPar0.default getPar0.hierarchical
Get starting values on working scale based on design matrix and other parameter constraintsgetParDM getParDM.default getParDM.hierarchical
Transition probability matrixgetTrProbs getTrProbs.default getTrProbs.hierarchical
Constructor of 'HMMfits' objectsHMMfits
Is crwDatais.crwData
Is crwHierDatais.crwHierData
Is crwHierSimis.crwHierSim
Is crwSimis.crwSim
Is HMMfitsis.HMMfits
Is miHMMis.miHMM
Is miSumis.miSum
Is momentuHierHMMis.momentuHierHMM
Is momentuHierHMMDatais.momentuHierHMMData
Is momentuHMMis.momentuHMM
Is momentuHMMDatais.momentuHMMData
Forward log-probabilitieslogAlpha
Backward log-probabilitieslogBeta
Fit continuous-time multivariate HMMs to multiple imputation dataMIfitCTHMM MIfitCTHMM.default MIfitCTHMM.hierarchical
Fit HMMs to multiple imputation dataMIfitHMM MIfitHMM.default MIfitHMM.hierarchical
Constructor of 'miHMM' objectsmiHMM
Calculate pooled parameter estimates and states across multiple imputationsMIpool
Constructor of 'miSum' objectsmiSum
Mixture probabilitiesmixtureProbs
Constructor of 'momentuHierHMM' objectsmomentuHierHMM
Constructor of 'momentuHierHMMData' objectsmomentuHierHMMData
Constructor of 'momentuHMM' objectsmomentuHMM
Constructor of 'momentuHMMData' objectsmomentuHMMData
Scaling function: natural to working parameters.n2w
Negative log-likelihood functionnLogLike
Negative log-likelihoodnLogLike_rcpp
Parameters definitionparDef
Plot 'crwData'plot.crwData plot.crwHierData
Plot 'miHMM'plot.miHMM
Plot 'miSum'plot.miSum
Plot 'momentuHMM'plot.momentuHMM
Plot 'momentuHMMData' or 'momentuHierHMMData'plot.momentuHierHMMData plot.momentuHMMData
Plot pseudo-residualsplotPR
Plot observations on satellite imageplotSat
Plot observations on raster imageplotSpatialCov
Plot statesplotStates
Plot stationary state probabilitiesplotStationary
Preprocessing of continuous-time discrete-space (CTDS) movement HMMs using ctmcmoveprepCTDS prepCTDS.default prepCTDS.hierarchical
Preprocessing of the data streams and covariatesprepData prepData.default prepData.hierarchical
Print 'miHMM'print.miHMM
Print 'miSum'print.miSum
Print 'momentuHMM'print.momentuHierHMM print.momentuHMM
Pseudo-residualspseudoRes
Random effects estimationrandomEffects
Set 'modelName' for a 'momentuHMM', 'miHMM', 'HMMfits', or 'miSum' objectsetModelName
Set 'stateNames' for a 'momentuHMM', 'miHMM', 'HMMfits', or 'miSum' objectsetStateNames
Simulation toolsimCTDS
Simulation toolsimCTHMM
Simulation toolsimData simHierData
Simulation toolsimHierCTDS
Simulation toolsimHierCTHMM
Observation error simulation toolsimObsData simObsData.momentuHierHMMData simObsData.momentuHMMData
State probabilitiesstateProbs
Stationary state probabilitiesstationary
Stationary distribution for a continuous-time Markov chainstationary_rcpp
Summary 'momentuHMMData'summary.momentuHierHMMData summary.momentuHMMData
Calculate proportion of time steps assigned to each state (i.e. "activity budgets")timeInStates timeInStates.HMMfits timeInStates.miHMM timeInStates.momentuHMM
Transition probability matrixtrMatrix_rcpp
Turning angleturnAngle
Viterbi algorithmviterbi
Scaling function: working to natural parametersw2n
Get XBXBloop_rcpp