Skip to contents

Calculate mean Sorensen pair-wise dissimilarity values for a ManyAnalyst dataset

Usage

calculate_sorensen_diversity_index(.data, .id = character())

Arguments

.data

A variable diversity dataset with columns for each unique variable used in all analyses. Values are NA if the analysis did not use that variable, and take the value of the variable as a character string if the analysis did use that variable. Each unique analysis is a row.

.id

character string of the analysis identifier column

Value

A tibble containing the variables id_col, mean_diversity_index and num_variables; the total number of variables used in a given analysis.

Details

Sorensen pair-wise dissimilarity is calculated as the number of shared variables between two analyses divided by the total number of variables used in both analyses. After calculating the Sorensen dissimilarity for all pairwise comparisons, the function then computes the mean diversity index for each analysis as the mean of all pairwise comparisons for that analysis, generating a single value per analysis.

See also

See betapart::beta.pair() for details of the Sorensen dissimilarity calculation.