Zeta.ddecays: Zeta distance decay for a range of numbers of assemblages or...

Description Usage Arguments Value References See Also Examples

Description

Computes the distance decay of zeta diversity for a range of orders (number of assemblages or sites), using generalised linear models.

Usage

1
2
3
4
5
Zeta.ddecays(xy, data.spec, orders = 2:10, sam = 1000,
  family = stats::gaussian(), distance.type = "Euclidean",
  dist.custom = NULL, method = "mean", confint.level = 0.95,
  trsf = "NULL", cutoff = NULL, rescale = FALSE, normalize = FALSE,
  plot = TRUE)

Arguments

xy

Site-by-coordinate data frame, with sites as rows and coordinates as columns.

data.spec

Site-by-species presence-absence data frame, with sites as rows and species as columns.

orders

Range of number of assemblages or sites at which zeta diversity is computed. All the orders must be striclty greater than 1.

sam

Number of samples for which the zeta diversity is computed.

family

A description of the error distribution and link function to be used in the generalised linear models (see family for details of family functions).

distance.type

Method to compute distance. Default is "Euclidean", for Euclidean distance. The other options are (i) "ortho" for orthodromic distance, if xy correspond to longitudes and latitudes (orthodromic distance is computed using the gdist function from package Imap); and (ii) "custom", in which case the user must provide a distance matrix for dist.custom.

dist.custom

Distance matrix provided by the user when distance.type = "custom".

method

Name of a function (as a string) indicating how to combine the pairwise differences and distances for more than 3 sites. It can be a basic R-function such as "mean" or "max", but also a custom function.

confint.level

Percentage for the confidence intervals of the coefficients from the linear regression.

trsf

Name of a function (as a string) indicating how to transform distance. Default is "NULL" for the identity transformation.

cutoff

If specified, maximum distance value for which the linear regression must be performed.

rescale

Boolean value (TRUE or FALSE) indicating if the zeta values should be divided by ΞΆ_1, to get a range of values between 0 and 1. Has no effect if normalize = TRUE.

normalize

Boolean value (TRUE or FALSE) indicating if the zeta values for each sample should be divided by the total number of species for this specific sample.

plot

Boolean value (TRUE or FALSE) indicating if the outputs must be plotted.

Value

Zeta.ddecays returns a list containing the following components:

orders

Range of number of assemblages or sites at which zeta diversity was computed.

coefs

A vector of the coefficients from the generalised linear models for the numbers of sites specified by orders.

confint

The confidence intervals for the coefficients from the generalised linear models.

References

Hui C. & McGeoch M.A. (2014). Zeta diversity as a concept and metric that unifies incidence-based biodiversity patterns. The American Naturalist, 184, 684-694.

See Also

Zeta.decline.mc, Zeta.order.mc, Zeta.decline.ex, Zeta.order.ex, Zeta.ddecay

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
utils::data(bird.spec.coarse)
xy.bird <- bird.spec.coarse[,1:2]
data.spec.bird <- bird.spec.coarse[,3:193]

dev.new()
zeta.ddecays.bird <- Zeta.ddecays(xy.bird, data.spec.bird, sam = 100, orders = 2:5, 
    plot = TRUE, confint.level = 0.95)

##########

utils::data(Marion.species)
xy.marion <- Marion.species[,1:2]
data.spec.marion <- Marion.species[,3:33]

dev.new()
zeta.ddecays.marion <- Zeta.ddecays(xy.marion, data.spec.marion, sam = 100, 
   orders = 2:5, plot = TRUE, confint.level = 0.95)


Search within the zetadiv package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.