calculate_non_breeding_relative_abundance.Rd
This function calculates relative abundance, six year relative abundance geometric mean and plots relative abundance trend for non-breeding species.
calculate_non_breeding_relative_abundance(
ospar,
label,
species_name,
target_threshold,
start_year,
end_year
)
dataframe of OSPAR region or sub region aggregated yearly abundance counts.
OSPAR region or sub region label. One of I, Im, In, Io, II, IIa, IIb, IIc, IId IIe, IIf, III, IV, V.
Common name of species
Target threshold for species, 0.7 if species lays more than egg, 0.8 for species laying one egg.
Start year of abundance analysis
End year of abundance analysis.
list containing region or subregions yearly and six year relative abundance means, for each non-breeding species.
The function performs the following steps
aggregates abundance counts as value for each year (variable) in data frame ospar.melt. Aggregation required for OSPAR regions with sub region counts eg I <- Io, Im, In
runs step baseline function to get the predicted start year count from first ten years regression model or mean of the first ten year if regression is not signifcant
calculates the relative abundance for each year by dividing count by baseline count, stored in index vector
calculates the six year rolling geometric relative abundance means, stored in six_year_mean vector
creates dat_unsm dataframe containing years, index and six_year_mean columns
creates and exports species yearly relative abundance trend plot for each species+region/sub region
returns yearly and six year mean relative abundance values for each species+region/sub region as dat_unsm data frame.
Other calculate relative abundance functions:
calculate_breeding_relative_abundance()