Tuesday, February 10, 2015

Biodiversity mapping functions for R (2): Weighted Endemism: test against expectation

Weighted Endemism non-parametric tests

I am sequentially posting some self-contained functions for mapping biodiversity metrics in R, this one is:

endemism.null.test.R
[full code at https://raw.githubusercontent.com/GregGuerin/biomap/master/endemism.null.test.R]:


Update: there is now an associated article: Guerin, G.R., Ruokolainen, L. & Lowe, A.J. (2015) A georeferenced implementation of weighted endemism. Methods in Ecology and EvolutionDOI: 10.1111/2041-210X.12361

Description --
Taking the outputs from the 'weighted.endemism' function (see previous post), tests whether observed endemism is higher than expected, using non-parametric methods


Details --
With the outputs from the 'weighted.endemism' function, performs the following tests:


1) non-parametric significance test as to whether observed endemism is higher or lower than expected, given species richness (and observed species frequencies)


2) identifies and maps outliers (i.e. in terms of map grid cells that have higher or lower endemism) based on quantiles. As categorical: whether endemism score lies more than 1.5 (or other user-defined amount) times outside the interquartile range; as continuous: the factor of the interquartile by which observed values differ from the median / 50% quantile). Returns vectors of values plus raster maps.


Raw weighted endemism scores are biased both by the completeness of species sampling and species richness itself. Correcting by dividing by the observed number of species ('corrected weighted endemism' of Crisp et al. 2001) is a proposed correction, but the relationship between endemism scores and species richness is not linear under a null model (random species draws), as increasingly infrequent species are drawn as richness increases, thereby increasing CWE. While correcting endemism scores in a more sophisticated way is possible, this function does not correct the scores per se, but compares them to a null distribution. This is achieved by making replicate random draws from the species pool based on the observed species richness (i.e. same number of species) and the actual species frequencies (more frequent species more likely to be drawn). The distribution of the resulting set of null endemism scores is compared to observed endemism and subsequently grid cells can be mapped as higher or lower than expected (based on significance testing and comparison to null quantiles).


Usage --
An example:


endemism_mydata <- weighted.endemism(mite, site.coords=mite.xy, records="site")

endemism.test.example <- endemism.null.test(endemism_mydata)

And an example of an output from a regional flora dataset from South Australia (non-parametric statistical significance that endemism is higher (or lower) than expected):




No comments:

Post a Comment