momentuHMM: R package for generalized hidden Markov models of animal movement
Abstract
- Discrete‐time hidden Markov models (HMMs) have become an immensely popular tool for inferring latent animal behaviours from telemetry data. While movement HMMs typically rely solely on location data (e.g. step length and turning angle), auxiliary biotelemetry and environmental data are powerful and readily‐available resources for incorporating much more ecological and behavioural realism. However, complex movement or observation process models often necessitate custom and computationally demanding HMM model‐fitting techniques that are impractical for most practitioners, and there is a paucity of generalized user‐friendly software available for implementing multivariate HMMs of animal movement.
- Here, we introduce an open‐source R package, momentuHMM, that addresses many of the deficiencies in existing HMM software. Features include: (1) data pre‐processing and visualization; (2) user‐specified probability distributions for an unlimited number of data streams and latent behaviour states; (3) biased and correlated random walk movement models, including dynamic “activity centres” associated with attractive or repulsive forces; (4) user‐specified design matrices and constraints for covariate modelling of parameters using formulas familiar to most R users; (5) multiple imputation methods that account for measurement error and temporally irregular or missing data; (6) seamless integration of spatio‐temporal covariate raster data; (7) cosinor and spline models for cyclical and other complicated patterns; (8) model checking and selection; and (9) simulation.
- After providing an overview of the main features of the package, we demonstrate some of the capabilities of momentuHMM using real‐world examples. These include models for cyclical movement patterns of African elephants, foraging trips of northern fur seals, loggerhead turtle movements relative to ocean surface currents, and grey seal movements among three activity centres.
- momentuHMM considerably extends the capabilities of existing HMM software while accounting for common challenges associated with telemetry data. It therefore facilitates more realistic hypothesis‐driven animal movement analyses that have hitherto been largely inaccessible to non‐statisticians. While motivated by telemetry data, the package can be used for analysing any type of data that is amenable to HMMs. Practitioners interested in additional features are encouraged to contact the authors.
1 INTRODUCTION
Animal movement is central to many ecological processes and considered essential to our understanding of animal behaviour, population dynamics, and the impacts of global change. Coupled with advances in animal‐borne biologging technology, there has been a recent explosion in analytical methods for inferring animal movement, behaviour, space use, and resource selection from telemetry data (Hooten, Johnson, McClintock, & Morales, 2017). Largely attributable to their ease of implementation and interpretation, discrete‐time hidden Markov models (HMMs) have become immensely popular for characterizing animal movement behaviour (e.g. Jonsen, Flemming, & Myers, 2005; Langrock et al., 2012; McClintock et al., 2012; Morales, Haydon, Frair, Holsinger, & Fryxell, 2004).
is assumed to be a Markov chain. The state sequence of the Markov chain is governed by (typically first‐order) state transition probabilities,
for i,j = 1,…,N, and an initial distribution δ(0). The likelihood of an HMM can be succinctly expressed using the forward algorithm:
(1)
is the N × N transition probability matrix, P(zt) = diag(p1(zt),…,pN(zt)), ps(zt) is the conditional probability density of zt given St = s, and 1N is a N‐vector of ones. For a thorough introduction to HMMs, see Zucchini, MacDonald, and Langrock (2016).
The most common discrete‐time animal movement HMMs for telemetry location data are composed of two data streams (e.g. step length and turning angle) and N = 2 hidden states (Jonsen et al., 2005; Morales et al., 2004). These states are often considered as proxies for animal behaviour and characterized by area‐restricted‐search‐type movements (“encamped” or “foraging”) and migratory‐type movements (“exploratory” or “transit”). Some common probability distributions for the step length data stream are the gamma or Weibull distributions, while the wrapped Cauchy or von Mises distributions are often employed for the turning angle (e.g. Langrock et al., 2012). While HMMs based solely on location data are somewhat limited in the number and type of biologically meaningful movement behaviour states they are able to accurately identify, auxiliary biotelemetry and environmental data allow for multivariate HMMs that can incorporate much more behavioural realism and facilitate inferences about complex ecological relationships that would otherwise be difficult or impossible to infer from location data alone (e.g. DeRuiter et al., 2017; McClintock, London, Cameron, & Boveng, 2017; McClintock, Russell, Matthiopoulos, & King, 2013).
When data streams are observed without error and at regular time intervals, a major advantage of HMMs is the relatively fast and efficient maximization of the likelihood using the forward algorithm (Equation 1) and computation of the most likely sequence of hidden states using the Viterbi algorithm (Zucchini et al., 2016). In movement HMMs, the decoded state sequence can be useful for determining when and where changes in behaviour occur, identifying habitats associated with particular behaviours (e.g. foraging “hotspots”), and calculating the proportion of time steps allocated to each state (i.e. “activity budgets”). However, location measurement error is rarely non‐existent in animal‐borne telemetry studies and depends on both the device and the system under study (e.g. Costa et al., 2010). Furthermore, telemetry data are often obtained with little or no temporal regularity, as in many marine mammal telemetry studies (e.g. Jonsen et al., 2005), such that observations do not align with the regular time steps required by discrete‐time HMMs. When explicitly accounting for uncertainty attributable to location measurement error, temporally‐irregular observations, or other forms of missing data, one must typically fit HMMs using computationally intensive (and often time‐consuming) model fitting techniques such as Markov chain Monte Carlo (e.g. Jonsen et al., 2005; McClintock et al., 2012). Unfortunately, complex analyses requiring novel statistical methods and custom model‐fitting algorithms are not practical for many practitioners.
While statisticians have been applying HMMs to telemetry data for decades, R (R Core Team, 2017) packages such as bsam (Jonsen et al., 2005), moveHMM (Michelot, Langrock, & Patterson, 2016), and swim (Whoriskey et al., 2017) have recently helped make these models more accessible to the practitioners that are actually conducting telemetry studies. While these contributions represent important steps forward, the models that can currently be implemented remain limited in many key respects. For example, most HMM software for animal movement is limited to correlated random walks with N = 2 states and two data streams (e.g. step length and turning angle). While moveHMM does permit N > 2, it is typically difficult to identify > 2 biologically‐meaningful behaviour states from only two data streams (e.g. Morales et al., 2004; Beyer, Morales, Murray & Fortin, 2013; McClintock et al., 2014). Both moveHMM and swim require temporally‐regular location data with negligible measurement error. Other notable deficiencies of existing software include limited abilities to incorporate spatio‐temporal environmental or individual covariates on parameters, biased movements in response to attractive, repulsive, or environmental forces (e.g. McClintock et al., 2012), group dynamic models (Langrock et al., 2014), cyclical (e.g. daily, seasonal) and other more complicated behavioural patterns, or constraints on parameters.
To address these deficiencies in existing software, we introduce a new user‐friendly R package, momentuHMM , intended for practitioners wishing to implement more flexible and realistic HMM analyses of animal movement while accounting for common challenges associated with telemetry data. We provide a brief overview of momentuHMM and demonstrate some of its capabilities using real‐world examples. Step‐by‐step tutorials, help files, examples, and code can be found in the package's documentation and vignette. This article describes momentuHMM version 1.4.0.
2 momentuHMM OVERVIEW
The workflow for momentuHMM analyses consists of several steps (Figure 1). These include data preparation, data visualization, model specification and fitting, results visualization, and model checking. The workhorse functions of the package are listed in Table 1. Usage of several of these functions is deliberately similar to equivalent functions in moveHMM (Michelot et al., 2016), but the momentuHMM arguments have been generalized and expanded to accommodate a much more flexible framework for data pre‐processing, model specification, parameterization, visualization, and simulation. R users already familiar with moveHMM will therefore likely find it easy to immediately begin using momentuHMM.

| Function | Description |
|---|---|
| crawlMerge | Merge crawlWrap output with additional data streams or covariates |
| crawlWrap | Fit continuous‐time correlated random walk (CTCRW) models and predict temporally‐regular locations using the crawl package |
| fitHMM | Fit a (multivariate) HMM to the data |
| MIfitHMM | Fit (multivariate) HMMs to multiple imputation data |
| MIpool | Pool momentuHMM model results across multiple imputations |
| plot.crwData | Plot crawlWrap output |
| plot.miSum | Plot summaries of multiple imputation momentuHMM models |
| plot.momentuHMM | Plot summaries of momentuHMM models |
| plot.momentuHMMData | Plot summaries of selected data streams and covariates |
| plotPR | Plot time series, qq‐plots and sample ACFs of pseudo‐residuals |
| plotSat | Plot locations on satellite image |
| plotSpatialCov | Plot locations on raster image |
| plotStates | Plot the (Viterbi‐)decoded states and state probabilities |
| prepData | Pre‐process data streams and covariates |
| pseudoRes | Calculate pseudo‐residuals for momentuHMM models |
| simData | Simulate data from a (multivariate) HMM |
| stateProbs | State probabilities for each time step |
| viterbi | Most likely state sequence (using the Viterbi algorithm) |
A key feature of momentuHMM is the ability to include an unlimited number of HMM data streams (e.g. step length, turning angle, dive activity, heart rate) arising from a broad range of commonly used probability distributions (e.g. beta, gamma, normal, Poisson, von Mises, Weibull). Using model formulas familiar to most R users, any of the data stream probability distribution parameters can be modelled as functions of environmental and individual covariates via link functions (e.g. McCullagh & Nelder, 1989, and see Table 2). The initial distribution (δ(0)) and state transition probabilities
can also be modelled as functions of covariates. Permissable R classes for covariates include numeric, integer, or factor. Spatio‐temporal covariates (e.g. wind velocity, forest cover, sea ice concentration) can also be raster classes (Hijmans, 2016), in which case momentuHMM extracts the appropriate values based on the time and location of each observation (see Section 3.3).
| Distribution | Support | Parameters | Link functiona |
|---|---|---|---|
| Bernoulli (“bern”) |
|
prob ∈ (0, 1) | logit |
| Beta (“beta”) |
|
shape1 > 0 | log |
| shape2 > 0 | log | ||
| zeromass ∈ (0, 1) | logit | ||
| onemass ∈ (0, 1) | logit | ||
| Exponential (“exp”) | zt > 0 | rate > 0 | log |
| zeromass ∈ (0,1) | logit | ||
| Gamma (“gamma”) | zt > 0 | mean > 0 | log |
| sd > 0 | log | ||
| zeromass ∈ (0, 1) | logit | ||
| Log normal (“lnorm”) | zt > 0 | location
|
identity |
| scale > 0 | log | ||
| zeromass ∈ (0, 1) | logit | ||
| Normal (“norm”) |
|
mean
|
identity |
| sd > 0 | log | ||
| Poisson (“pois”) |
|
lambda > 0 | log |
| Von Mises (“vm”) |
|
mean ∈ (−π, π] | tan (mean/2) |
| concentration > 0 | log | ||
| Von Mises(“vmConsensus”) |
|
mean ∈ (−π, π] | Rivest et al. (2016) |
| kappa > 0 | log | ||
| Weibull (“weibull”) | zt > 0 | shape > 0 | log |
| scale > 0 | log | ||
| zeromass ∈ (0, 1) | logit | ||
| Wrapped Cauchy (“wrpcauchy”) |
|
mean ∈ (−π, π] | tan (mean/2) |
| concentration ∈ (0, 1) | logit |
-
aLink functions (g) relate natural scale parameters (θ) to a T × k design matrix (X) and k−vector of working scale parameters
such that g(θ) = Xβ.
2.1 Data preparation and visualization
For temporally regular location data with negligible measurement error, the prepData function returns a momentuHMMData object (i.e. a data frame of class momentuHMMData) that can be used for data visualization and further analysis. Summary plots of momentuHMMData objects can be created for any data stream or covariate using the generic plot function. If location data are temporally irregular or subject to measurement error, then a two‐stage multiple imputation approach can be performed (Hooten et al., 2017; McClintock, 2017). We discuss this pragmatic approach to incorporating location uncertainty into HMMs of animal movement in Section 2.3.
2.2 HMM specification and fitting
- data A momentuHMMData object
- nbStates Number of latent states (N)
- dist A list indicating the probability distributions for the data streams
- estAngleMean A list indicating whether or not to estimate the mean for angular data streams (e.g. turning angle)
- formula Model formula for state transition probabilities

- stationary Logical indicating whether or not the initial distribution (δ(0)) is considered equal to the stationary distribution
- Par0 A list of starting values for the probability distribution parameters of each data stream
These seven arguments are all that are needed in order to fit the HMMs currently supported in moveHMM (Michelot et al., 2016), but the similarities between the packages largely end here. Many of the arguments in fitHMM and other momentuHMM functions are lists, with each element of the list corresponding to a data stream. Additional data streams can be added to HMMs by simply adding additional elements to these list arguments (see Section 3.2).
The formula argument can include many of the functions and operators commonly used to construct terms in R model formulas (e.g. a*b, a:b, cos(a)). It can also be used to specify transition probability matrix models that incorporate cyclical patterns using the cosinor function (see Section 3.1), splines for explaining other more complicated patterns (e.g. bs and ns functions in the R base package splines), and factor variables (e.g. group‐ or individual‐level effects). By default, the formula argument applies to all entries in the transition probability matrix (Γ(t)), but special functions allow for state‐ and parameter‐specific formulas to be specified. Specific state transition probabilities can also be fixed to zero (or any other value), which can be useful for incorporating more behavioural realism by prohibiting or enforcing switching from one particular state to another (possibly as a function of spatio‐temporal covariates). Similar arguments are available for initial distribution parameters .
The DM argument of fitHMM allows covariate models to be specified for the state‐dependent probability distribution parameters of each data stream. DM formulas are just as flexible as the formula argument. In lieu of formulas, DM can also be specified as a “pseudo‐design” matrix with rows and columns corresponding to the natural and working scale parameters, respectively (Table 2). Pseudo‐design matrices allow working parameters to be shared among natural parameters for imposing relational constraints (e.g. μ1 = μ2, μ1 ≤ μ2). Probability distribution parameters can also be fixed to user‐specified values.
Another noteworthy fitHMM argument, circularAngleMean, enables circular–circular regression models for the mean direction of angular distributions, such as the wrapped Cauchy and von Mises, instead of circular‐linear models based on the tangent link function (Table 2). As a trade‐off between biased and correlated movements, circular–circular regression models can weigh the attractive (or repulsive) strengths of angular covariates relative to short‐term directional persistence, using a special link function based on Rivest, Duchesne, Nicosia, and Fortin (2016). Many interesting hypotheses can be addressed using circular‐circular regression, including the effects of wind, sea surface currents, and centres of attraction on animal movement direction (see Sections 3.3 and 3.4).
2.3 Multiple imputation
When location data are temporally‐irregular or subject to measurement error, momentuHMM can be used to perform the two‐stage multiple imputation approach of McClintock (2017). There are three primary functions for performing multiple imputation HMM analyses: crawlWrap, MIfitHMM, and MIpool. Based on the R package crawl (Johnson, 2017), crawlWrap is a wrapper function for fitting the continuous‐time correlated random walk (CTCRW) model of Johnson, London, Lea, and Durban (2008) and then predicting temporally‐regular tracks of the user's choosing (e.g. 15 min, hourly, daily). MIfitHMM is essentially a wrapper function for fitHMM that repeatedly fits the same user‐specified HMM to m imputed datasets using maximum likelihood . Based on the m model fits, the MIpool function calculates pooled estimates, standard errors, and confidence intervals using standard multiple imputation formulae. Data streams or covariates that are dependent on location (e.g. step length, turning angle, habitat type, snow depth, sea surface temperature) will of course vary among the m realizations of the position process, and the pooled inferences across the fitted HMMs therefore reflect location uncertainty.
2.4 Model visualization and diagnostics
The generic plot function for momentuHMM model objects plots the data stream histograms along with their corresponding estimated probability distributions, the estimated natural parameters and state transition probabilities as a function of any covariates included in the model, and the tracks of all individuals (colour‐coded by the most likely state sequence). Confidence intervals for the natural parameters and state transition probabilities can also be plotted. For multiple imputation analyses, estimated 95% location error ellipses can be included in plots of individual tracks. Diagnostic tools include the calculation and plotting of pseudo‐residuals (Zucchini et al., 2016) using the pseudoRes and plotPR functions, respectively. Akaike's Information Criterion (AIC) and AIC weights can be calculated for one or more models using the AIC.momentuHMM and AICweights functions, respectively.
2.5 Simulation
The function simData can be used to simulate multivariate HMMs from scratch or from a fitted model. The arguments are very similar to those used for data preparation and model specification, but they include additional arguments for simulating location data subject to temporal irregularity and measurement error. Among other features, activity centres and rasters of spatio‐temporal covariates can be utilized (see Section 3.4). simData can therefore simulate more ecologically realistic tracks (potentially subject to observation error) for study design, power analyses, and assessing model performance or goodness‐of‐fit (Morales et al., 2004).
3 EXAMPLES
We now demonstrate some of the capabilities of momentuHMM using real telemetry data. Intended for demonstration purposes only, we do not claim these represent improvements relative to previous or alternative analyses for these datasets. While space limits us to only a few key elements here, complete details and code for reproducing all examples described herein are provided in the “vignettes” source directory.
3.1 African elephant
As our first example, we use an African elephant Loxodonta africana bull track described in Wall, Wittemyer, LeMay, Douglas‐Hamilton, and Klinkenberg (2014). In addition to hourly locations, the tag collected external temperature data. Using fitHMM, we fitted a two‐state HMM assuming a wrapped Cauchy distribution for turning angle and a gamma distribution for step length. Autocorrelation function estimates suggest there are 24 hr cycles in the step length data (Figure 2), and this presents an opportunity to demonstrate the cosinor model for incorporating cyclical behaviour in model parameters. We therefore specified temperature effects on the turning angle concentration parameters and cycling temperature effects (with a 24 hr periodicity) on the step length and state transition probability parameters using the DM and formula arguments.

The model identifed a state of slow undirected movement (“encamped”), and a state of faster and more directed movement (“exploratory”) (Figure 2). Interestingly, this model suggests step lengths and directional persistence for the “encamped” state decreased as temperature increased, step lengths for both states tended to decrease in the late evening and early morning, and transition probabilities from the “encamped” to “exploratory” state decreased as temperature increased (Figure 3). This model was overwhelmingly supported by AIC when compared to alternative models with fewer covariates, but model fit can be further assessed using pseudo‐residuals. In this case, the pseudo‐residuals indicate the model explained much of the periodicity in step length, although there does still appear to be some room for improvement (Figure 2).

3.2 Northern fur seal
We use the northern fur seal Callorhinus ursinus example from McClintock et al. (2014) to demonstrate the use of additional data streams for distinguishing behaviours with similar horizontal trajectories (e.g. “resting” and “foraging”) in a multivariate HMM. The data consist of 241 temporally irregular Fastloc GPS locations obtained during a foraging trip of a nursing female near the Pribilof Islands of Alaska, USA. The tag included time‐depth recording capabilities, and the dive activity data were summarized as the number of foraging dives over T = 228 temporally‐regular 1 hr time steps. To fit the N = 3 state (1 = “resting”, 2 = “foraging”, 3 = “transit”) model of McClintock et al. (2014), we first used crawlWrap to predict temporally regular locations at 1 hr time steps assuming a bivariate normal location measurement error model. We then used multiple imputation to account for location uncertainty by repeatedly fitting the three‐state HMM to m = 100 realizations of the position process using MIfitHMM. We specified a gamma distribution for step length, wrapped Cauchy distribution for turning angle, and Poisson distribution for the number of foraging dives.
Our results were very similar to those of the discrete‐time Bayesian model of McClintock et al. (2014), with periods of “foraging” often followed by “resting” at sea (Figure 4). Activity budgets based on the estimated state sequences for each imputation were 0.31 (95% CI: 0.23–0.4) for “resting”, 0.28 (95% CI: 0.23–0.34) for “foraging”, and 0.41 (95% CI: 0.31–0.51) for “transit”.

3.3 Loggerhead turtle
Using hitherto unpublished loggerhead turtle Caretta caretta data for a captive‐raised juvenile released on the coast of North Carolina, USA, we now demonstrate how movement direction and step length can be easily modelled as a function of angular covariates in momentuHMM. The data consist of temporally irregular Argos locations and rasters of daily ocean surface currents collected between 20 November and 19 December 2012. Assuming a gamma distribution for step length and a wrapped Cauchy distribution for turning angle, we modelled the mean step length parameter as a function of ocean surface current speed (wt) and direction (rt) relative to the bearing of movement (bt) at time t. We also modelled the turning angle mean parameter as a trade‐off between short‐term directional persistence and bias in the direction of ocean surface currents using the circular‐circular regression link function.
Using multiple imputation, we fitted a two‐state HMM including a “foraging” state unaffected by currents and a “transit” state potentially influenced by ocean surface currents. After preparing the data, this rather complicated HMM can be specified, fitted, and visualized in only a few lines of code (see package vignette for complete details). For the “transit” state, pooled parameter estimates indicated step lengths increased with ocean surface current speed and as the bearing of movement aligned with ocean surface current direction (Figure 5). The estimated wrapped Cauchy distribution for turning angle had mean angles (μt) biased towards the direction of ocean surface currents for each time step, with concentration parameter ρ = 0.86 (95% CI: 0.8–0.92) indicating turning angles were highly concentrated around μt. Thus, movement during the “transit” state appears to strongly follow ocean surface currents, while movement during the “foraging” state exhibited shorter step lengths perpendicular to ocean surface currents with no directional persistence .

3.4 Grey seal
We now revisit an analysis of a grey seal Halichoerus grypus track that was originally conducted by McClintock et al. (2012) using Bayesian methods and computationally intensive Markov chain Monte Carlo. This seal tended to move in a clockwise fashion between two terrestrial “haul‐out” sites and a foraging area in the North Sea. Because the seal repeatedly visited the same haul‐out and foraging locations, it provides an excellent example for demonstrating how biased movements relative to activity centres can be modelled using momentuHMM. McClintock et al. (2012) fitted a five‐state HMM to these data that included three “centre of attraction” states, with movement biased towards two haul‐out sites (“Abertay” and “Farne Islands”) and a foraging area (“Dogger Bank”), and two “exploratory” states that were unassociated with an activity centre. After using crawlWrap to predict T = 1,515 temporally regular locations at 2 hr time steps, we performed a very similar analysis to McClintock et al. (2012) using MIfitHMM .
Each model fit required about 4 min on a standard desktop computer (macOS El Capitan, 16 GB RAM, 2.8 GHz Intel Core i7). Estimated activity budgets for the 5 states of this multiple‐imputation HMM were 0.28 (0.28–0.29) for the “Abertay” haul‐out state, 0.12 (0.11–0.14) for the “Farne Islands” haul‐out state, 0.37 (0.35–0.38) for the “Dogger Bank” foraging state, 0.09 (0.04–0.18) for a low‐speed “exploratory” state, and 0.14 (0.09–0.22) for a high‐speed “exploratory” state. All three activity centre states exhibited shorter step lengths and less biased movements when within the vicinity of these targets. Results from this analysis were thus very similar to McClintock et al. (2012), but this implementation required far less computation time and no custom model‐fitting algorithms. A simulated track generated using simData is presented along with the fitted track in Figure 6.

4 DISCUSSION
We have introduced the R package momentuHMM and demonstrated some of its capabilities for conducting multivariate HMM analyses with animal location, auxiliary biotelemetry, and environmental data. There are many types of analyses that can be conducted with momentuHMM that hitherto required custom code and model‐fitting algorithms (e.g. Langrock et al., 2014; McClintock et al., 2013, 2017; Michelot et al., 2017). The package therefore greatly expands on available software and facilitates the incorporation of more ecological and behavioural realism for hypothesis‐driven analyses of animal movement that account for many of the challenges commonly associated with telemetry data. While many features were motivated by animal movement data, we note that the package can be used for analysing any type of data that is amenable to HMMs.
Model fitting is relatively fast because the forward algorithm (Equation 1) is coded in C++. Because multiple imputations are completely parallelizable, with sufficient processing power computation times for analyses that account for measurement error, temporal irregularity, or other forms of missing data need not be longer than that required to fit a single HMM. However, computation times will necessarily be longer as the number of states and/or parameters increase. For example, on a standard desktop computer (macOS El Capitan, 16 GB RAM, 2.8 GHz Intel Core i7), momentuHMM required about 1 hr to fit a single HMM with N = 6 states, seven data streams, and T = 7,414 time steps (McClintock, 2017).
As in any maximum likelihood analysis based on numerical optimization, computation times will also depend on starting values. Specifying “good” starting values is arguably the most challenging aspect of model fitting, and the package includes functions that are designed to help with the specification of starting values (e.g. checkPar0, getPar, getPar0, and getParDM). It also includes options for re‐optimization based on random perturbations of the parameters to help explore the likelihood surface and diagnose convergence to local maxima.
While momentuHMM includes functions for drawing realizations of the position process based on the CTCRW model of Johnson et al. (2008), this is but one of many methods for performing multiple imputation. Realizations of the position process from any movement model that accounts for measurement error and/or temporal irregularity (e.g. Calabrese, Fleming, & Gurarie, 2016) can be passed to MIfitHMM. Multiple imputation methods also need not be limited to these telemetry error scenarios. For example, other forms of missing data could be imputed, thereby allowing investigation of non‐random mechanisms for missingness that can be problematic if left unaccounted for in HMMs.
There remains many potential avenues for refinement and extension. Computation times could likely be improved by further optimizing the code for speed. Notable extensions include hidden semi‐Markov models and random effects (Zucchini et al., 2016). It is straightforward to add additional data stream probability distributions, and practitioners interested in additional features are encouraged to contact the authors.
ACKNOWLEDGEMENTS
We are grateful to R. Scott, B. Godley, M. Godfrey, J. Sudre, and North Carolina Aquariums for providing the data used in our turtle example. We thank S. Goslee, J. London, J. Sterling, and two anonymous referees for helpful comments on an earlier draft of this paper. The findings and conclusions in the manuscript are those of the author(s) and do not necessarily represent the views of the National Marine Fisheries Service, NOAA. Any use of trade, product, or firm names does not imply an endorsement by the US Government.
AUTHORS’ CONTRIBUTIONS
B.T.M. and T.M. developed the package and wrote the manuscript.
DATA ACCESSIBILITY
All code mentioned here is available in the momentuHMM package for R hosted on CRAN at https://CRAN.R-project.org/package=momentuHMM. The development version of the package is available on GitHub at https://github.com/bmcclintock/momentuHMM.
REFERENCES
Citing Literature
Number of times cited according to CrossRef: 41
- Matt I. D. Carter, Brett T. McClintock, Clare B. Embling, Kimberley A. Bennett, Dave Thompson, Debbie J. F. Russell, From pup to predator: generalized hidden Markov models reveal rapid development of movement strategies in a naïve long‐lived vertebrate, Oikos, 10.1111/oik.06853, 129, 5, (630-642), (2020).
- Susanne Marieke Vogel, Ben Lambert, Anna Catherine Songhurst, Graham Paul McCulloch, Amanda Lee Stronza, Tim Coulson, Exploring movement decisions: Can Bayesian movement‐state models explain crop consumption behaviour in elephants (Loxodonta africana)?, Journal of Animal Ecology, 10.1111/1365-2656.13177, 89, 4, (1055-1068), (2020).
- B. J. Dunphy, S. I. Vickers, J. Zhang, R. L. Sagar, T. J. Landers, S. J. Bury, A. J. R. Hickey, M. J. Rayner, Seabirds as environmental indicators: foraging behaviour and ecophysiology of common diving petrels (Pelecanoides urinatrix) reflect local-scale differences in prey availability, Marine Biology, 10.1007/s00227-020-3672-4, 167, 4, (2020).
- Marianna Chimienti, Monica F. Blasi, Sandra Hochscheid, Movement patterns of large juvenile loggerhead turtles in the Mediterranean Sea: Ontogenetic space use in a small ocean basin, Ecology and Evolution, 10.1002/ece3.6370, 10, 14, (6978-6992), (2020).
- A Kane, E Pirotta, S Wischnewski, EJ Critchley, A Bennison, M Jessopp, JL Quinn, Spatio-temporal patterns of foraging behaviour in a wide-ranging seabird reveal the role of primary productivity in locating prey, Marine Ecology Progress Series, 10.3354/meps13386, 646, (175-188), (2020).
- Thomas A. Clay, Rocío Joo, Henri Weimerskirch, Richard A. Phillips, Olivier Ouden, Mathieu Basille, Susana Clusella‐Trullas, Jelle D. Assink, Samantha C. Patrick, Sex‐specific effects of wind on the flight decisions of a sexually dimorphic soaring bird, Journal of Animal Ecology, 10.1111/1365-2656.13267, 89, 8, (1811-1823), (2020).
- LA Hückstädt, LK Schwarz, AS Friedlaender, BR Mate, AN Zerbini, A Kennedy, J Robbins, NJ Gales, DP Costa, A dynamic approach to estimate the probability of exposure of marine predators to oil exploration seismic surveys over continental shelf waters, Endangered Species Research, 10.3354/esr01048, 42, (185-199), (2020).
- Francesco Ventura, José Pedro Granadeiro, Oliver Padget, Paulo Catry, Gadfly petrels use knowledge of the windscape, not memorized foraging patches, to optimize foraging trips on ocean-wide scales, Proceedings of the Royal Society B: Biological Sciences, 10.1098/rspb.2019.1775, 287, 1918, (20191775), (2020).
- Marianna Chimienti, Jean-Pierre Desforges, Larissa T. Beumer, Jacob Nabe-Nielsen, Floris M. van Beest, Niels Martin Schmidt, Energetics as common currency for integrating high resolution activity patterns into dynamic energy budget-individual based models, Ecological Modelling, 10.1016/j.ecolmodel.2020.109250, 434, (109250), (2020).
- Jeroen Hubert, James Adam Campbell, Hans Slabbekoorn, Effects of seismic airgun playbacks on swimming patterns and behavioural states of Atlantic cod in a net pen, Marine Pollution Bulletin, 10.1016/j.marpolbul.2020.111680, 160, (111680), (2020).
- Henry R. Scharf, Frances E. Buderman, Animal movement models for multiple individuals, WIREs Computational Statistics , 10.1002/wics.1506, 12, 6, (2020).
- D. Cote, C.J. Morris, P.M. Regular, M.G. Piersiak, Effects of 2D Seismic on Snow Crab Movement Behavior, Fisheries Research, 10.1016/j.fishres.2020.105661, 230, (105661), (2020).
- Daniel M. Coffey, Mark A. Royer, Carl G. Meyer, Kim N. Holland, Diel patterns in swimming behavior of a vertically migrating deepwater shark, the bluntnose sixgill (Hexanchus griseus), PLOS ONE, 10.1371/journal.pone.0228253, 15, 1, (e0228253), (2020).
- Christopher Beirne, Amelia C. Meier, Gabriela Brumagin, Liam Jasperse-Sjolander, Matthew Lewis, Juliana Masseloux, Kimberly Myers, Mike Fay, Joseph Okouyi, Lee J. T. White, John R. Poulsen, Climatic and Resource Determinants of Forest Elephant Movements, Frontiers in Ecology and Evolution, 10.3389/fevo.2020.00096, 8, (2020).
- Kerry M. Dore, Malene F. Hansen, Amy R. Klegarth, Claudia Fichtel, Flávia Koch, Andrea Springer, Peter Kappeler, Joyce A. Parga, Tatyana Humle, Christelle Colin, Estelle Raballand, Zhi-Pang Huang, Xiao-Guang Qi, Anthony Di Fiore, Andrés Link, Pablo R. Stevenson, Danica J. Stark, Noeleen Tan, Christa A. Gallagher, C. Jane Anderson, Christina J. Campbell, Marina Kenyon, Paula Pebsworth, David Sprague, Lisa Jones-Engel, Agustín Fuentes, Review of GPS collar deployments and performance on nonhuman primates, Primates, 10.1007/s10329-020-00793-7, (2020).
- Christian Gredzens, Donna J. Shaver, Satellite Tracking Can Inform Population-Level Dispersal to Foraging Grounds of Post-nesting Kemp’s Ridley Sea Turtles, Frontiers in Marine Science, 10.3389/fmars.2020.00559, 7, (2020).
- Dhanushi A. Wijeyakulasuriya, Elizabeth W. Eisenhauer, Benjamin A. Shaby, Ephraim M. Hanks, Machine learning for modeling animal movement, PLOS ONE, 10.1371/journal.pone.0235750, 15, 7, (e0235750), (2020).
- E. Hance Ellington, Erich M. Muntz, Stanley D. Gehrt, Seasonal and daily shifts in behavior and resource selection: how a carnivore navigates costly landscapes, Oecologia, 10.1007/s00442-020-04754-1, (2020).
- Joseph D. Bailey, Edward A. Codling, Emergence of the wrapped Cauchy distribution in mixed directional data, AStA Advances in Statistical Analysis, 10.1007/s10182-020-00380-7, (2020).
- Rémi Patin, Marie‐Pierre Etienne, Emilie Lebarbier, Simon Chamaillé‐Jammes, Simon Benhamou, Identifying stationary phases in multivariate time series for highlighting behavioural modes and home range settlements, Journal of Animal Ecology, 10.1111/1365-2656.13105, 89, 1, (44-56), (2019).
- Rocío Joo, Matthew E. Boone, Thomas A. Clay, Samantha C. Patrick, Susana Clusella‐Trullas, Mathieu Basille, Navigating through the r packages for movement, Journal of Animal Ecology, 10.1111/1365-2656.13116, 89, 1, (248-267), (2019).
- Hannah J. Williams, Lucy A. Taylor, Simon Benhamou, Allert I. Bijleveld, Thomas A. Clay, Sophie Grissac, Urška Demšar, Holly M. English, Novella Franconi, Agustina Gómez‐Laich, Rachael C. Griffiths, William P. Kay, Juan Manuel Morales, Jonathan R. Potts, Katharine F. Rogerson, Christian Rutz, Anouk Spelt, Alice M. Trevail, Rory P. Wilson, Luca Börger, Optimizing the use of biologgers for movement ecology research, Journal of Animal Ecology, 10.1111/1365-2656.13094, 89, 1, (186-206), (2019).
- Lucy A. Taylor, Fritz Vollrath, Ben Lambert, Daniel Lunn, Iain Douglas‐Hamilton, George Wittemyer, Movement reveals reproductive tactics in male elephants, Journal of Animal Ecology, 10.1111/1365-2656.13035, 89, 1, (57-67), (2019).
- Mevin B. Hooten, Xinyi Lu, Martha J. Garlick, James A. Powell, Animal movement models with mechanistic selection functions, Spatial Statistics, 10.1016/j.spasta.2019.100406, (100406), (2019).
- Johannes Signer, John Fieberg, Tal Avgar, Animal movement tools (amt): R package for managing tracking data and conducting habitat selection analyses, Ecology and Evolution, 10.1002/ece3.4823, 9, 2, (880-890), (2019).
- Allison Patterson, Hugh Grant Gilchrist, Lorraine Chivers, Scott Hatch, Kyle Elliott, A comparison of techniques for classifying behavior from accelerometers for two species of seabird, Ecology and Evolution, 10.1002/ece3.4740, 9, 6, (3030-3045), (2019).
- Ian R. Cleasby, Ewan D. Wakefield, Barbara J. Morrissey, Thomas W. Bodey, Steven C. Votier, Stuart Bearhop, Keith C. Hamer, Using time-series similarity measures to compare animal movement trajectories in ecology, Behavioral Ecology and Sociobiology, 10.1007/s00265-019-2761-1, 73, 11, (2019).
- Edward Hurme, Eliezer Gurarie, Stefan Greif, L. Gerardo Herrera M., José Juan Flores-Martínez, Gerald S. Wilkinson, Yossi Yovel, Acoustic evaluation of behavioral states predicted from GPS tracking: a case study of a marine fishing bat, Movement Ecology, 10.1186/s40462-019-0163-7, 7, 1, (2019).
- Leena Riekkola, Virginia Andrews-Goff, Ari Friedlaender, Rochelle Constantine, Alexandre N. Zerbini, Environmental drivers of humpback whale foraging behavior in the remote Southern Ocean, Journal of Experimental Marine Biology and Ecology, 10.1016/j.jembe.2019.05.008, 517, (1-12), (2019).
- Evert Mul, Marie-Anne Blanchet, Martin Biuw, Audun Rikardsen, Implications of tag positioning and performance on the analysis of cetacean movement, Animal Biotelemetry, 10.1186/s40317-019-0173-7, 7, 1, (2019).
- Nathan M. Bacheler, Théo Michelot, Robin T. Cheshire, Kyle W. Shertzer, Fine-scale movement patterns and behavioral states of gray triggerfish Balistes capriscus determined from acoustic telemetry and hidden Markov models, Fisheries Research, 10.1016/j.fishres.2019.02.014, 215, (76-89), (2019).
- Nicholas Carter, Raylene Cooke, John G. White, Desley Whisson, Bronwyn Isaac, Nick Bradsworth, Joining the dots: How does an apex predator move through an urbanizing landscape?, Global Ecology and Conservation, 10.1016/j.gecco.2019.e00532, (e00532), (2019).
- Sophie Bestley, Virginia Andrews-Goff, Esmee van Wijk, Stephen R. Rintoul, Michael C. Double, Jason How, New insights into prime Southern Ocean forage grounds for thriving Western Australian humpback whales, Scientific Reports, 10.1038/s41598-019-50497-2, 9, 1, (2019).
- Ethan Lawler, Kim Whoriskey, William H. Aeberhard, Chris Field, Joanna Mills Flemming, The Conditionally Autoregressive Hidden Markov Model (CarHMM): Inferring Behavioural States from Animal Tracking Data Exhibiting Conditional Autocorrelation, Journal of Agricultural, Biological and Environmental Statistics, 10.1007/s13253-019-00366-2, (2019).
- Catherine G Haase, Robert J Fletcher, Daniel H Slone, James P Reid, Susan M Butler, Traveling to thermal refuges during stressful temperatures leads to foraging constraints in a central-place forager, Journal of Mammalogy, 10.1093/jmammal/gyz197, (2019).
- Erik Kleyheeg, Wolfgang Fiedler, Kamran Safi, Jonas Waldenström, Martin Wikelski, Mariëlle Liduine van Toor, A Comprehensive Model for the Quantitative Estimation of Seed Dispersal by Migratory Mallards, Frontiers in Ecology and Evolution, 10.3389/fevo.2019.00040, 7, (2019).
- D. Cote, B. Tibble, R. A. Curry, S. Peake, B. K. Adams, K. D. Clarke, R. Perry, Seasonal and diel patterns in activity and habitat use by brook trout (Salvelinus fontinalis) in a small Newfoundland lake, Environmental Biology of Fishes, 10.1007/s10641-019-00931-1, (2019).
- Jan Bulla, Roland Langrock, Antonello Maruotti, Guest editor’s introduction to the special issue on “Hidden Markov Models: Theory and Applications”, METRON, 10.1007/s40300-019-00157-2, (2019).
- I. D. Jonsen, C. R. McMahon, T. A. Patterson, M. Auger‐Méthé, R. Harcourt, M. A. Hindell, S. Bestley, Movement responses to environment: fast inference of variation among southern elephant seals with a mixed effects model, Ecology, 10.1002/ecy.2566, 100, 1, (2018).
- S.L. Cox, C.B. Embling, P.J. Hosegood, S.C. Votier, S.N. Ingram, Oceanographic drivers of marine mammal and seabird habitat-use across shelf-seas: A guide to key features and recommendations for future research and conservation management, Estuarine, Coastal and Shelf Science, 10.1016/j.ecss.2018.06.022, (2018).
- Pablo M. Vergara, Gerardo E. Soto, Amanda D. Rodewald, Madelaine Quiroz, Behavioral switching in Magellanic woodpeckers reveals perception of habitat quality at different spatial scales, Landscape Ecology, 10.1007/s10980-018-0746-5, (2018).




