Code to support "Ecosystem services in connected catchment to coast ecosystems: monitoring to detect emerging trends"
Christopher J. Brown et al. Contact: c.j.brown@utas.edu.au
If using this code please cite the study: Christopher J. Brown, Chantal Saint Ange, Rod M. Connolly, Syezlin Hasan, Sue Jackson, Joseph M. McMahon, James C.R. Smart, 2023, Ecosystem services in connected catchment to coast ecosystems: Monitoring to detect emerging trends, Science of The Total Environment DOI: 10.1016/j.scitotenv.2023.161670
Data used in model fitting are also provided as a csv for convenience, but please see Table S1 of the preprint for data sources. It is recommended you consult those sources, and their caveats, before using the data for other projects.
Model structure overview
Model data fits and prediction of ecological condition
Files for all the model runs (.rda files) and figures not provided here, due to size. Example model run files are in: fitted-model-examples/. You will have to update paths in the scripts to use these example files.
Fit the model to data. Also contains options to refit for different catchability and initial biomass settings
Stan code for the model
Create plots and tables from paper for the results in fit-indicator-model.R (figure 2)
As above, but plot for each of the different catchability and initial biomass parameters
Create plot for effect size (figure 3)
Generate results and plots for emergence time (figures 4 & 5)
As above, but creates plots for models fit with each of the different catchability and initial biomass parameters
Functions needed for calculating emergence time and running the sim study
Fit the indicator model to simulated data
Plots results of simulation study in loop-fit-simulations.R
Compare the model based indicator to a traditional indicator based on the weighted sum of indicator values. Not used in the publication.