Diversity.Hill

Hill numbers are found in the Diversity.Hill submodule.

Usage

Accessing the main functionality in the package is simple:

julia> using Diversity.Hill
julia> community = [10, 20, 20, 0, 3]5-element Vector{Int64}: 10 20 20 0 3
julia> community = community ./ sum(community)5-element Vector{Float64}: 0.18867924528301888 0.37735849056603776 0.37735849056603776 0.0 0.05660377358490566
julia> hillnumber(community, [0, 1, 2])3×7 DataFrame Row measure q type_level type_name partition_level partition_na String Int64 String String String String ⋯ ─────┼────────────────────────────────────────────────────────────────────────── 1 │ HillNumber 0 types subcommunity 1 ⋯ 2 │ HillNumber 1 types subcommunity 1 3 │ HillNumber 2 types subcommunity 1 2 columns omitted

A Hill number of order q is the diversity of a community in which every type is completely distinct from every other. Order 0 counts the types present — here 4, since one of the five has no individuals — and higher orders weight the commoner types more heavily, so the diversity falls as q rises.

Diversity.Hill.hillnumberMethod
hillnumber(proportions, qs)

Calculate the Hill number (or naive diversity) of order q of population(s) with given relative proportions

Arguments:

  • proportions: relative proportions of different individuals / species in population (vector, or matrix where columns are individual populations)

  • qs: single number or vector of orders of diversity measurement

Returns:

  • Diversity of order qs (single number or vector of diversities)
source