31 research outputs found

    hmmTMB: Hidden Markov models with flexible covariate effects in R

    Full text link
    Hidden Markov models (HMMs) are widely applied in studies where a discrete-valued process of interest is observed indirectly. They have for example been used to model behaviour from human and animal tracking data, disease status from medical data, and financial market volatility from stock prices. The model has two main sets of parameters: transition probabilities, which drive the latent state process, and observation parameters, which characterise the state-dependent distributions of observed variables. One particularly useful extension of HMMs is the inclusion of covariates on those parameters, to investigate the drivers of state transitions or to implement Markov-switching regression models. We present the new R package hmmTMB for HMM analyses, with flexible covariate models in both the hidden state and observation parameters. In particular, non-linear effects are implemented using penalised splines, including multiple univariate and multivariate splines, with automatic smoothness selection. The package allows for various random effect formulations (including random intercepts and slopes), to capture between-group heterogeneity. hmmTMB can be applied to multivariate observations, and it accommodates various types of response data, including continuous (bounded or not), discrete, and binary variables. Parameter constraints can be used to implement non-standard dependence structures, such as semi-Markov, higher-order Markov, and autoregressive models. Here, we summarise the relevant statistical methodology, we describe the structure of the package, and we present an example analysis of animal tracking data to showcase the workflow of the package

    Markov-switching generalized additive models

    Full text link
    We consider Markov-switching regression models, i.e. models for time series regression analyses where the functional relationship between covariates and response is subject to regime switching controlled by an unobservable Markov chain. Building on the powerful hidden Markov model machinery and the methods for penalized B-splines routinely used in regression analyses, we develop a framework for nonparametrically estimating the functional form of the effect of the covariates in such a regression model, assuming an additive structure of the predictor. The resulting class of Markov-switching generalized additive models is immensely flexible, and contains as special cases the common parametric Markov-switching regression models and also generalized additive and generalized linear models. The feasibility of the suggested maximum penalized likelihood approach is demonstrated by simulation and further illustrated by modelling how energy price in Spain depends on the Euro/Dollar exchange rate

    Stochastic models of animal movement and habitat selection

    Get PDF
    The analysis of animal movement reveals important features of habitat preferences and behaviours, and informs environmental conservation decisions. In this thesis, we present new statistical methods, to tackle the problem of scale dependence in models of animal movement. The inferences obtained from most existing approaches are tied to a particular spatio-temporal scale, which makes the interpretation and comparison of results difficult. We first focus on models of habitat selection, which combine tracking data and environmental data, to understand the drivers of animal movement. The two most popular approaches describe habitat selection on two different scales, and their parameters have different interpretations. We propose a time series approach to integrate local and global habitat selection. We explain how stochastic processes with known stationary distributions can be used, to describe both the short-term transition density and the long-term equilibrium distribution of the movement. The proposed approach captures both the short-term and long-term habitat selection. We suggest using Markov chain Monte Carlo (MCMC) algorithms to model animal movement. A MCMC algorithm describes transition rules, which lead to a limiting distribution: its target distribution. We also suggest the Langevin diffusion process as a continuous-time model of movement with known stationary distribution. We describe methods of estimation, to obtain habitat selection and movement parameters from tracking data. We then turn to the problem of the time formulation in models of animal movement and behaviour. Most widely-used models describe movement in discrete time, and their results are tied to the time scale of the observed data. We extend a popular continuous-time model of movement, to include behavioural heterogeneity. The approach can be used to identify behavioural phases from movement data collected at irregular intervals, and with measurement error. We describe a framework of Bayesian inference, to estimate movement parameters and behavioural phases from tracking data

    The Langevin diffusion as a continuous-time model of animal movement and habitat selection

    Get PDF
    TM was supported by the Centre for Advanced Biological Modelling at the University of Sheffield, funded by the Leverhulme Trust, award number DS-2014-081.1. The utilisation distribution of an animal describes the relative probability of space use. It is natural to think of it as the long-term consequence of the animal's short-term movement decisions: it is the accumulation of small displacements which, over time, gives rise to global patterns of space use. However, many estimation methods for the utilisation distribution either assume the independence of observed locations and ignore the underlying movement (e.g. kernel density estimation), or are based on simple Brownian motion movement rules (e.g. Brownian bridges). 2. We introduce a new continuous-time model of animal movement, based on the Langevin diffusion. This stochastic process has an explicit stationary distribution, conceptually analogous to the idea of the utilisation distribution, and thus provides an intuitive framework to integrate movement and space use. We model the stationary (utilisation) distribution with a resource selection function to link the movement to spatial covariates, and allow inference about habitat preferences of animals. 3. Standard approximation techniques can be used to derive the pseudo-likelihood of the Langevin diffusion movement model, and to estimate habitat preference and movement parameters from tracking data. We investigate the performance of the method on simulated data, and discuss its sensitivity to the time scale of the sampling. We present an example of its application to tracking data of Steller sea lions (Eumetopias jubatus). 4. Due to its continuous-time formulation, this method can be applied to irregular telemetry data. The movement model is specified using a habitat-dependent utilisation distribution, and it provides a rigorous framework to estimate long-term habitat selection from correlated movement data. The Langevin movement model can be approximated by linear model, which allows for very fast inference. Standard tools such as residuals can be used for model checking.PostprintPeer reviewe

    Understanding decision making in a food-caching predator using hidden Markov models

    Get PDF
    Financial support was provided by the People’s Trust for Endangered Species (PTES), Zoologische Gesellschaft für Arten- und Populationsschutz (ZGAP), Quagga Conservation Fund and IdeaWild.Background Tackling behavioural questions often requires identifying points in space and time where animals make decisions and linking these to environmental variables. State-space modeling is useful for analysing movement trajectories, particularly with hidden Markov models (HMM). Yet importantly, the ontogeny of underlying (unobservable) behavioural states revealed by the HMMs has rarely been verified in the field. Methods Using hidden Markov models of individual movement from animal location, biotelemetry, and environmental data, we explored multistate behaviour and the effect of associated intrinsic and extrinsic drivers across life stages. We also decomposed the activity budgets of different movement states at two general and caching phases. The latter - defined as the period following a kill which likely involves the caching of uneaten prey - was subsequently confirmed by field inspections. We applied this method to GPS relocation data of a caching predator, Persian leopard Panthera pardus saxicolor in northeastern Iran. Results Multistate modeling provided strong evidence for an effect of life stage on the behavioural states and their associated time budget. Although environmental covariates (ambient temperature and diel period) and ecological outcomes (predation) affected behavioural states in non-resident leopards, the response in resident leopards was not clear, except that temporal patterns were consistent with a crepuscular and nocturnal movement pattern. Resident leopards adopt an energetically more costly mobile behaviour for most of their time while non-residents shift their behavioural states from high energetic expenditure states to energetically less costly encamped behaviour for most of their time, which is likely to be a risk avoidance strategy against conspecifics or humans. Conclusions This study demonstrates that plasticity in predator behaviour depending on life stage may tackle a trade-off between successful predation and avoiding the risks associated with conspecifics, human presence and maintaining home range. Range residency in territorial predators is energetically demanding and can outweigh the predator’s response to intrinsic and extrinsic variables such as thermoregulation or foraging needs. Our approach provides an insight into spatial behavior and decision making of leopards, and other large felids in rugged landscapes through the application of the HMMs in movement ecology.Publisher PDFPeer reviewe

    Energy-based step selection analysis : modelling the energetic drivers of animal movement and habitat use

    Get PDF
    We acknowledge funding from Mitacs Canada, the Canadian Association of Zoos and Aquariums, Canadian Wildlife Federation, Environment and Climate Change Canada, Hauser Bears, Natural Sciences and Engineering Research Council of Canada, Polar Bears International, Polar Continental Shelf Project, Quark Expeditions, United States Department of the Interior (Bureau of Ocean Energy Management), and World Wildlife Fund Canada.1. The energetic gains from foraging and costs of movement are expected to be key drivers of animal decision-making, as their balance is a large determinant of body condition and survival. This fundamental perspective is often missing from habitat selection studies, which mainly describe correlations between space use and environmental features, rather than the mechanisms behind these correlations. 2. To address this gap, we present a novel parameterisation of step selection functions (SSFs), that we term the energy selection function (ESF). In this model, the likelihood of an animal selecting a movement step depends directly on the corresponding energetic gains and costs, and we can therefore assess how moving animals choose habitat based on energetic considerations. 3. The ESF retains the mathematical convenience and practicality of other SSFs and can be quickly fitted using standard software. In this article, we outline a workflow, from data gathering to statistical analysis, and use a case study of polar bears Ursus maritimus to demonstrate application of the model. 4. We explain how defining gains and costs at the scale of the movement step allows us to include information about resource distribution, landscape resistance and movement patterns. We further demonstrate this process with a case study of polar bears and show how the parameters can be interpreted in terms of selection for energetic gains and against energetic costs. 5. The ESF is a flexible framework that combines the energetic consequences of both movement and resource selection, thus incorporating a key mechanism into habitat selection analysis. Further, because it is based on familiar habitat selection models, the ESF is widely applicable to any study system where energetic gains and costs can be derived, and has immense potential for methodological extensions.PostprintPeer reviewe
    corecore