Skip to content

Hill

Hill numbers are found in the Diversity.Hill package.

Usage

Accessing the main functionality in the package is simple:

julia> using Diversity.Hill

julia> community = [10, 20, 20, 0, 3];

julia> community /= sum(community);

julia> diversities = hillnumber(community, [0, 1, 2])
3×7 DataFrames.DataFrame
│ Row │ measure      │ q │ type_level │ type_name │ partition_level │
├─────┼──────────────┼───┼────────────┼───────────┼─────────────────┤
│ 1   │ "HillNumber" │ 0 │ "types"    │ ""        │ "subcommunity"  │
│ 2   │ "HillNumber" │ 1 │ "types"    │ ""        │ "subcommunity"  │
│ 3   │ "HillNumber" │ 2 │ "types"    │ ""        │ "subcommunity"  │

│ Row │ partition_name │ diversity │
├─────┼────────────────┼───────────┤
│ 1   │ "1"            │ 4.0       │
│ 2   │ "1"            │ 3.36264   │
│ 3   │ "1"            │ 3.09021   │

# Diversity.HillModule.

Hill numbers are found in the Diversity.Hill package.

source

# 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