Generalized additive model of zeta for a set of environmental variables and distance

Description

Computes a generalized additive model of zeta diversity for a given order (number of assemblages or sites) against a set of environmental variables and distances between sites.

Usage

1
2
Zeta.gam(data.spec, data.env, xy = NULL, order = 1, sam = 1000,
  standard = TRUE, method = "mean")

Arguments

data.spec

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

data.env

Sites-by-variable data frame, with sites as rows and environmental variables as columns.

xy

Site coordinates

order

Specific number of assemblages or sites at which zeta diversity is computed.

sam

Number of samples for which the zeta-diversity is computed.

standard

Boolean parameter indicating if the spatial distances and differences in environmental variables should be standardized between 0 and 1.

method

Indicates how to combine the pairwise differences and distances for more than 3 sites. Method can be "mean" or "max".

Details

If order = 1, the environmental variables must be numeric and are used as such in the regression. If order>1, the environmental variables can be numeric or factorial.

Value

Zeta.gam returns an object of class "gam", containing the output of the generalized additive model of zeta over the environmental variables.

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, Zeta.order, Zeta.lm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
data(BCI.spec.coarse)
xy <- BCI.spec.coarse[1:2]
data.spec <- BCI.spec.coarse[3:308]
data(BCI.env.coarse)
data.env <- BCI.env.coarse[10:15]

zeta.gam <- Zeta.gam(data.spec, data.env, sam = 100, order = 3)
summary(zeta.gam)
dev.new()
plot(zeta.gam)

zeta.gam <- Zeta.gam(data.spec, data.env, xy, sam = 100, order = 3)
summary(zeta.gam)
dev.new()
plot(zeta.gam)

##########

data(Marion.species)
xy <- Marion.species[1:2]
data.species <- Marion.species[3:33]
data(Marion.env)
data.env <- Marion.env[3]

zeta.gam.species <- Zeta.gam(data.species, data.env, sam = 100, order = 3)
summary(zeta.gam.species)
dev.new()
plot(zeta.gam.species)

zeta.gam.species <- Zeta.gam(data.species, data.env, xy, sam = 100, order = 2)
summary(zeta.gam.species)
dev.new()
plot(zeta.gam.species)