CompositeTrend: CompositeTrend function

Description Usage Arguments Value


This function can be used to produce composite metrics of change (indicators), whilst propagating uncertainty in the individual species trend estimates through to the final composite trend metric. This function takes in a dataframe of sampled annual occupancy estimates across multiple species and returns a a single composite trend metric with uncertainty. This approach is only suitable for species without missing years.


CompositeTrend(indata, output_path, trend_choice = "arithmetic_logit_occ",
  group_name, save_iterations = "yes", TrendScale = NULL,
  plot_output = TRUE)



The file path to an .rdata file containing a dataframe (called samp_post - GP to change this) which contains year columns (prefixed with "X", e.g "X1985"), a species column ("spp"), and an iteration identifier ("iter"). The year columns contain the annual occupancy estimates for the species-year-iteration combination in question.


The location where the outputs should be saved.


The approach used to combine the individual species estimates into a single composite trend. See details.


The name of the species group we are running, used for naming output files.


Do we want to save the composite trend estimates for each individual iteration, these are generally used for estimating temporal trends with uncertainty.


Traditionally some indicators are scaled so the first year is set to a given number, 100 in the case of the UK biodiversity indicators. This value can be chosen here, with no scaling as the default.


plot the resulting composite indicator: TRUE or FALSE.

  • "arithmetic_logit_occ" - The raw occupancy values are converted to the log odds scale (using the logit function). The arithmetic mean across species is used to create a composite trend for each iteration. These means are then converted back to the odds scale (exp)

  • "geometric_raw_occ" - Take the geometric mean across species raw occupancy estimates

  • "arithmetic_raw_occ" - potentially drop this, as not used.


A summary file. This .csv is saved in the output_path location and contains the annual composite indicator estimate (summarized across the iterations as wither the mean or median). The unique number of species contributing to the indicator is shown in the "spp_num" column. Various forms of uncertainty (estimated across the iterations) for the annual composite trend are presented, including the upper and lower 95

BiologicalRecordsCentre/BRCindicators documentation built on May 6, 2019, 7:55 a.m.