Finlay Thompson
Dragonfly
Building a two stage Bayesian dolphin capture model with JAGS
This is joint work with Edward Abraham and Megan Oliver at Dragonfly, carried out on behalf of the Ministry of Fisheries
Common dolphin are killed by trawlers targeting jack mackerel off the west coast of the North Island. Estimates of the total number of dolphins captured are made using a two stage Bayesian capture model, fitted using Markov chain Monte Carlo techniques. About 20% of the jack mackerel trawl fishery has been observed, and the model is used to estimate captures on the unobserved trawls.
The model estimates the probability of a capture event occurring (first stage) using a hierarchical general linear model. The number of dolphins caught (stage two), is then estimated from a zero-truncated Poisson distribution. This structure reflects the pragmatic need to deal with data that contains a lot of zeros, and the behavioural process involved: dolphins tend to swim together, and get caught together.
The model is specified using the BUGS language, and fitted using JAGS (Just Another Gibbs Sampler), a program developed by Martyn Plummer. A fully scripted process was developed for this project, taking data from extracts, through grooming, modelling, plotting, to final publication. A description of this process stack is given, along with advantages and problems identified along the way. A range of open source tools was used, including Postgresql, R, JAGS, Sweave, Latex, all glued together with Git, Bash, Make and Linux.