Skip to content

Commit

Permalink
doc: betadiv measures
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoisot committed Jun 17, 2023
1 parent 6334244 commit c2e84b0
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docs/SpeciesInteractionNetworks.bib
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,46 @@ @Article{Bascompte2003nested
publisher = {Proceedings of the National Academy of Sciences},
}

@Article{Whittaker1960Vegetation,
author = {R. H. Whittaker},
journal = {Ecological Monographs},
title = {Vegetation of the Siskiyou Mountains, Oregon and California},
year = {1960},
issn = {0012-9615},
month = {jul},
number = {3},
pages = {279-338},
volume = {30},
doi = {10.2307/1943563},
publisher = {Wiley},
}

@Book{Magurran1988Ecological,
author = {Magurran, Anne E},
publisher = {Princeton university press},
title = {Ecological diversity and its measurement},
year = {1988},
}

@Book{Southwood2009Ecological,
author = {Southwood, Thomas Richard Edmund and Henderson, Peter A},
publisher = {John Wiley \& Sons},
title = {Ecological methods},
year = {2009},
}

@Article{Wilson1984Measuring,
author = {M. V. Wilson and A. Shmida},
journal = {The Journal of Ecology},
title = {Measuring Beta Diversity with Presence-Absence Data},
year = {1984},
issn = {0022-0477},
month = {nov},
number = {3},
pages = {1055},
volume = {72},
doi = {10.2307/2259551},
publisher = {{JSTOR}},
}

@Comment{jabref-meta: databaseType:bibtex;}
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ nav:
- Nestedness: community_level/nestedness.md
- Meta:
- Beta-diversity: meta_level/betadiversity.md
- Beta-diversity measures: meta_level/dissimilarities.md
- Set operations: meta_level/sets.md
- Random:
- Permutations: random_networks/permutations.md
Expand Down
19 changes: 19 additions & 0 deletions docs/src/meta_level/dissimilarities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# List of dissimilarity functions

!!! abstract

The methods in this page are from [Koleff2003Measuring](@citet); when called on the output of [`betadiversity`](@ref), they will return a (dis)similarity score.

In the original paper [Koleff2003Measuring](@cite), the measures are expressed
as a function of ``a`` (the number of shared elements), ``b`` (the number of
elements unique to the right/neighbouring set), and ``c`` (the number of
elements unique to the left/focal set). In this documentation, we use a slightly
different convention, where ``c = L`` (left), ``a = S`` (shared), and ``b = R``
(right).

## List of measures

```@docs
KGL01
KGL08
```
27 changes: 27 additions & 0 deletions src/meta_level/measures.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
"""
KGL01(S::T) where {T<:NamedTuple}
``\beta_w = \\frac{L+S+R}{(2S + L + R)/2}``
###### References
[Magurran1988Ecological](@citet)
[Southwood2009Ecological](@citet)
[Whittaker1960Vegetation](@citet)
"""
function KGL01(S::T) where {T<:NamedTuple}
return (S.shared+S.right+S.left)/((S.shared + (S.shared+S.right+S.left))/2.0)
end
Expand Down Expand Up @@ -29,6 +44,18 @@ function KGL07(S::T) where {T<:NamedTuple}
return exp(KGL06(S))-1.0
end

"""
KGL08(S::T) where {T<:NamedTuple}
``\beta_t = \\frac{L+R}{(2S + L + R)}``
This method is used in [Poisot2022Dissimilarity](@citet), and has a lot of
desirable properties. We suggest its use as a default.
###### References
[Wilson1984Measuring](@citet)
"""
function KGL08(S::T) where {T<:NamedTuple}
return (S.right + S.left) / (2*S.shared + S.right + S.left)
end
Expand Down

0 comments on commit c2e84b0

Please sign in to comment.