The Conditionally Autoregressive Hidden Markov Model (CarHMM): Inferring Behavioural States from Animal Tracking Data Exhibiting Conditional Autocorrelation

  • Ethan LawlerEmail author
  • Kim Whoriskey
  • William H. Aeberhard
  • Chris Field
  • Joanna Mills Flemming


One of the central interests of animal movement ecology is relating movement characteristics to behavioural characteristics. The traditional discrete-time statistical tool for inferring unobserved behaviours from movement data is the hidden Markov model (HMM). While the HMM is an important and powerful tool, sometimes it is not flexible enough to appropriately fit the data. Data for marine animals often exhibit conditional autocorrelation, self-dependence of the step length process that cannot be explained solely by the behavioural state, which violates one of the main assumptions of the HMM. Using a grey seal track as an example we motivate and develop the conditionally autoregressive hidden Markov model (CarHMM), a generalization of the HMM designed specifically to handle conditional autocorrelation. In addition to introducing and examining the new CarHMM with numerous simulation studies, we provide guidelines for all stages of an analysis using either an HMM or CarHMM. These include guidelines for pre-processing location data to obtain deflection angles and step lengths, model selection, and model checking. In addition to these practical guidelines, we link estimated model parameters to biologically relevant quantities such as activity budget and residency time. We also provide interpretations of traditional “foraging” and “transiting” behaviours in the context of the new CarHMM parameters.

Supplementary materials accompanying this paper appear online.


Hidden Markov model Movement ecology Discrete time Marine animal movement Autoregressive process Model checking 



The authors would like to thank the associate editor and two reviewers who provided immensely helpful comments and, in particular, gave additional focus to the simulation section. We also thank the Ocean Tracking Network, Damian Lidgard at Dalhousie University, and Dan Bowen at the Department of Fisheries and Oceans for allowing the use of the grey seal data used in Sects. 5 and 6. This research was funded by a Canadian Statistical Sciences Institute Collaborative Research Team, and a Vanier Canada Graduate Scholarship and Killam Predoctoral Scholarship to the first author.

Supplementary material

13253_2019_366_MOESM1_ESM.pdf (616 kb)
Supplementary material 1 (pdf 616 KB)


  1. Ailliot, P. (2006). Some theoretical results on Markov-switching autoregressive models with gamma innovations. Comptes Rendus Mathematique, 343(4):271–274.MathSciNetCrossRefGoogle Scholar
  2. Breed, G. A., Costa, D. P., Jonsen, I. D., Robinson, P. W., and Mills-Flemming, J. (2012). State-space methods for more completely capturing behavioral dynamics from animal tracks. Ecological Modelling, 235-236:49 – 58.CrossRefGoogle Scholar
  3. Curry, D. M. (2014). An algorithm for clustering animals by species based upon daily movement. Procedia Computer Science, 36:629 – 636.CrossRefGoogle Scholar
  4. Douc, R., Moulines, E., Rydén, T., et al. (2004). Asymptotic properties of the maximum likelihood estimator in autoregressive models with Markov regime. The Annals of Statistics, 32(5):2254–2304.MathSciNetCrossRefGoogle Scholar
  5. Forester, J. D., Ives, A. R., Turner, M. G., Anderson, D. P., Fortin, D., Beyer, H. L., Smith, D. W., and Boyce, M. S. (2007). State-space models link elk movement patterns to landscape characteristics in Yellowstone National Park. Ecological Monographs, 77(2):285–299.CrossRefGoogle Scholar
  6. Hooten, M., Johnson, D., McClintock, B., and Morales, J. (2017a). Animal Movement: Statistical Models for Telemetry Data. CRC Press, Boca Raton.CrossRefGoogle Scholar
  7. Hooten, M. B., King, R., and Langrock, R. (2017b). Guest editor’s introduction to the special issue on “animal movement modeling”. Journal of Agricultural, Biological and Environmental Statistics, 22(3):224–231.MathSciNetCrossRefGoogle Scholar
  8. Hussey, N. E., Kessel, S. T., Aarestrup, K., Cooke, S. J., Cowley, P. D., Fisk, A. T., Harcourt, R. G., Holland, K. N., Iverson, S. J., Kocik, J. F., Mills Flemming, J. E., and Whoriskey, F. G. (2015). Aquatic animal telemetry: A panoramic window into the underwater world. Science, 348(6240):1255642.CrossRefGoogle Scholar
  9. Jonsen, I. D., Flemming, J. M., and Myers, R. A. (2005). Robust state-space modeling of animal movement data. Ecology, 86(11):2874–2880.CrossRefGoogle Scholar
  10. Kristensen, K., Nielsen, A., Berg, C. W., Skaug, H. J., and Bell, B. M. (2016). TMB: Automatic differentiation and Laplace approximation. Journal of Statistical Software, 70(5):1–21.CrossRefGoogle Scholar
  11. Langrock, R., King, R., Matthiopoulos, J., Thomas, L., Fortin, D., and Morales, J. M. (2012). Flexible and practical modeling of animal telemetry data: hidden Markov models and extensions. Ecology, 93(11):2336–2342.CrossRefGoogle Scholar
  12. Leos-Barajas, V., Gangloff, E. J., Adam, T., Langrock, R., van Beest, F. M., Nabe-Nielsen, J., and Morales, J. M. (2017). Multi-scale modeling of animal movement and general behavior data using hidden Markov models with hierarchical structures. Journal of Agricultural, Biological and Environmental Statistics, 22(3):232–248.MathSciNetCrossRefGoogle Scholar
  13. 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.MathSciNetCrossRefGoogle Scholar
  14. McClintock, B. T., King, R., Thomas, L., Matthiopoulos, J., McConnell, B. J., and Morales, J. M. (2012). A general discrete-time modeling framework for animal movement using multistate random walks. Ecological Monographs, 82(3):335–349.CrossRefGoogle Scholar
  15. McClintock, B. T. and Michelot, T. (2018). momentuhmm: R package for generalized hidden Markov models of animal movement. Methods in Ecology and Evolution, 9(6):1518–1530.CrossRefGoogle Scholar
  16. Michelot, T., Langrock, R., and Patterson, T. A. (2016). movehmm: An R package for the statistical modelling of animal movement data using hidden Markov models. Methods in Ecology and Evolution, 7(11):1308–1315.CrossRefGoogle Scholar
  17. Morales, J. M., Haydon, D. T., Frair, J., Holsinger, K. E., and Fryxell, J. M. (2004). Extracting more out of relocation data: Building movement models as mixtures of random walks. Ecology, 85(9):2436–2445.CrossRefGoogle Scholar
  18. Patterson, T. A., Parton, A., Langrock, R., Blackwell, P. G., Thomas, L., and King, R. (2017). Statistical modelling of individual animal movement: an overview of key methods and a discussion of practical challenges. AStA Advances in Statistical Analysis, 101(4):399–438.MathSciNetCrossRefGoogle Scholar
  19. Pohle, J., Langrock, R., van Beest, F. M., and Schmidt, N. M. (2017). Selecting the number of states in hidden Markov models: Pragmatic solutions illustrated using animal movement. Journal of Agricultural, Biological and Environmental Statistics, 22(3):270–293.MathSciNetCrossRefGoogle Scholar
  20. Potts, J. R., Marie, A., Karl, M., and Lewis, M. A. (2014). A generalized residual technique for analysing complex movement models using earth mover’s distance. Methods in Ecology and Evolution, 5(10):1012–1022.CrossRefGoogle Scholar
  21. Scharf, H., Hooten, M. B., and Johnson, D. S. (2017). Imputation approaches for animal movement modeling. Journal of Agricultural, Biological and Environmental Statistics, 22(3):335–352.MathSciNetCrossRefGoogle Scholar
  22. Shepherd, B. E., Li, C., and Liu, Q. (2016). Probability-scale residuals for continuous, discrete, and censored data. Canadian Journal of Statistics, 44(4):463–479.MathSciNetCrossRefGoogle Scholar
  23. Whoriskey, K., Auger-Méthé, M., Albertsen, C. M., Whoriskey, F. G., Binder, T. R., Krueger, C. C., and Mills Flemming, J. (2017). A hidden Markov movement model for rapidly identifying behavioral states from animal tracks. Ecology and Evolution, 7(7):2112–2121.CrossRefGoogle Scholar
  24. Zucchini, W., MacDonald, I. L., and Langrock, R. (2016). Hidden Markov models for time series: an introduction using R (Vol. 150). Boca Raton: CRC Press.zbMATHGoogle Scholar

Copyright information

© International Biometric Society 2019

Authors and Affiliations

  1. 1.Department of Mathematics and StatisticsDalhousie UniversityHalifaxCanada
  2. 2.Department of Mathematical SciencesStevens Institute of TechnologyHobokenUSA

Personalised recommendations