Skip to contents

Computes the Sorensen diversity indices and joins it to data in preparation for meta-analysing all subsets of data with meta_analyse_datasets().

Usage

compute_MA_inputs(ManyEcoEvo, estimate_type = NULL)

Arguments

ManyEcoEvo

A dataframe grouped by the character columns dataset, estimate_type, exclusion_set. Each group corresponds to a subset of the full dataset, and has the subset analyst data stored in data, with its corresponding subset diversity_data.

estimate_type

character string, one of "Zr", "yi", "y25", "y50", "y75".

Value

A dataframe that includes the additional columns in ManyEcoEvo, but with added columns diversity_indices and effects_analysis.

Details

Computes Sorensen diversity indices diversity_indices for each subset of data returning them in the list-column diversity_indices and joins them to the relevant subset of processed analyst data within the list-column effects_analysis.

Note that, the name of the subset is derived from the functions within by subset_fns_yi() and/or subset_fns_Zr() called in the previous step of data processing generate_exclusion_subsets(). Should the user wish to skip the generate_exclusion_subsets() step, they can supply arbitrary values for exclusion_set and the function will still work.

Should be run after all data subsetting is complete, otherwise the diversity indices will need to be recalculated.