Code for "Life-history traits inform population trends when assessing the conservation status of a declining tiger shark population"
Citation: Brown CJ, Roff G. Life-history traits inform population trends when assessing the conservation status of a declining tiger shark population. Biological Conservation. 2019 Nov 1;239:108230. (pre-print on biorxiv)
The paper fits Bayesian generalized additive models (using a random walk) and shows how we can relate the variance of the random walk (which controls its 'wiggiliness') to shark life-history traits.
This repo includes code for the simulation study described in the above paper, core functions for fitting Bayesian GAMMs to the shark population data and a script that fits the models.
Unfortunately we do not have a license to provide the data here, more details on the data are in the paper. The simulation-study script is stand-alone, and will run without any data (it generates it's own).
Has functions to fit the GAMMs to spatio-temporal population data.
Simulates data and fits models to it. This will run without any additional data files
Fits the AR1 model described in the paper. The model fitting is actually done within a function (see sharks-functions.R). This script loops over different subsets of the data to explore how data quantity affects fits and trend estimates.
Fits the GAMMs described in the paper. Similar to above, but not Bayesian.
Makes the plots for the GAM fits.