Introduction

patter implements particle algorithms for animal movement modelling, with a focus on passive acoustic telemetry systems. The statistical methodology integrates observations and movement in a process-based framework that accounts for all available information to reconstruct movement paths and emergent patterns of space use from animal tracking data (such as detections at receivers and archival (depth) time series). This vignette qualitatively outlines the methodology, providing an entry point to the literature (Lavender et al., in prep) and the package (Lavender et al., in prep). See the subsequent vignettes to learn how to implement the methodology using patter (type vignette(package = "patter") to list vignettes).

Evolution

The statistical methodology in patter unifies (and refines) a suite of methods known as the flapper algorithms (Lavender et al., 2023). In their original presentation, the flapper algorithms were presented in two parts: an acoustic-container (AC) branch and a particle-filtering (PF) branch. AC-branch algorithms define the set of possible locations of an individual given the data at each time step. The AC algorithm handles the information from acoustic observations and the DC algorithm handles the information from depth observations (which are often collected alongside acoustic data). PF-branch algorithms refine AC-branch outputs given a movement model. In the predecessor flapper package, AC-branch algorithms were implemented via ac(), dc() and acdc() and their outputs were refined through PF via pf() and pf_simplify().

In patter, we have streamlined, enhanced and formalised the original methodology within the framework of particle filtering and smoothing (Doucet & Johansen, 2008). (Particle sampling algorithms remain to be added to the package.) In the particle filter, we simulate individual states (typically, locations) using the movement model, contingent upon past and present observations. Each sample is termed a ‘particle’. In patter, this is achieved with a single function (pf_filter()) that integrates the functions of the AC- and PF-branch algorithms.

The particle filter is refined by particle smoothing. In the original flapper implementation, a smoothing/sampling-like process was implemented by pf_simplify() and involved pruning ‘dead ends’ from a forward run of the particle filter. If you imagine a forward-running particle filter as a growing fungal network between two points in space (representing the start and end of a time series), dead ends are the side branches of the (simulated) fungal network that fail to reach the end. However, here are two, related limitations with the ‘prune’ methodology. The first is that the removal of dead ends tends to bias particle samples, because early samples (which invariably sooner-or-later end up on a dead-end) are more likely to get killed than later samples. This is known as particle degeneracy. The second is that while particles are contingent upon the past (a partial marginal distribution), they do not embody information from the future (i.e., the full marginal). In patter, particle smoothing mitigates these issues (see pf_smoother_*()). Particle sampling algorithms reconstruct movement trajectories but are not currently implemented.

See NEWS for a summary of the differences between flapper and patter.

Forward simulation

Algorithm

Consider a regular sequence of time steps, along which we have collected observations (at regular or irregular intervals). In the particle filter, we run along the time series, sampling particle (states or locations that are compatible with the data and properties of movement) as we go. This works as follows:

  • Proposals. At each time step, propose a series of candidate locations in which the individual could be located. For example, given a previous location, we simulate step lengths and turning angles from a movement model and use these to ‘kick’ an individual into new locations.
  • Likelihood. Calculate the likelihood of the data, given each proposal. The likelihoods of acoustic and archival data given each proposal can be resolved by the equations of the AC and DC algorithms (or modifications thereof). For example, the AC algorithm calculates the likelihood of acoustic observations (the presence or absence of detections at each receiver) according a model of detection probability, given proposal locations.
  • Weights. Translate likelihoods into sampling weights that encapsulate the information in the data and the movement model.
  • Sampling. Periodically, sample \(N\) proposals, with replacement, in line with the weights. This process effectively kills off particles that are incompatible with the data and increases the frequency of more likely proposals.

This process continues until the end of the time series. The outcome is a set of particle samples (partial marginal distributions), one for each time step.

Implementation

The implementation of the particle filter in patter is a four step process:

  • (optional) pat_setup_data() is used to validate input datasets;
  • assemble_*() functions are used to prepare datasets;
  • pf_filter() implements the particle filter, given:
    • The State type;
    • The movement model (ModelMove);
    • The observation models (ModelObs);

Smoothing

Particle smoothing algorithms re-weight particles from the filter, incorporating information not only from the past but from the future as well. In other words, smoothing generates an approximation of the full marginal distribution for an individual’s latent state at each time step. At the time of writing, we have implemented the two-filter smoother via via pf_smoother_two_filter().

Mapping

Patterns of space use (utilisation distributions) can be reconstructed using standard statistical techniques (see map_pou(), map_dens() and map_hr_*() for built-in functions).

References

Doucet, A. & Johansen, A. M. (2008). A tutorial on particle filtering and smoothing: Fifteen years later. https://www.stats.ox.ac.uk/~doucet/doucet_johansen_tutorialPF2011.pdf.

Lavender. E. et al. (2023). An integrative modelling framework for passive acoustic telemetry. Methods in Ecology and Evolution. https://doi.org/10.1111/2041-210X.14193.