Learn R Programming

bipartite (version 2.19)

czvalues: Computes c and z for network modules

Description

Function to compute c and z values of module members according to Guimerà & Amaral (2005), with formulae taken from Olesen et al. (2007)

Usage

czvalues(moduleWebObject, weighted=FALSE, level="higher")

Value

A list with two vectors, c and z, for all species of the selected trophic level.

Arguments

moduleWebObject

A moduleWeb-class object as created by computeModules.

weighted

logical; if TRUE computes c and z from quantitative (=weighted) data; in this case, it will compute strength, rather than degrees for each species.

level

"higher" or "lower" trophic level to compute c and z values for; defaults to "higher"

Author

Carsten F. Dormann carsten.dormann@biom.uni-freiburg.de, 20 Mar 2012

Details

c = 1 - sum( (k.it/k.i)^2) # among-module connectivity = participation coefficient P in Guimerà & Amaral

z = (k.is - ks.bar) / SD.ks # within-module degree

k.is = number of links of i to other species in its own module s; ks.bar = average k.is of all species in module s; SD.ks = standard deviation of k.is of all species in module s; k.it = number of links of species i to module t; k.i = degree of species i

Note that for any species alone (in its level) in a module the z-value will be NaN, since then SD.ks is 0. This is a limitation of the way the z-value is defined (in multiples of degree/strength standard deviations).

Olesen et al. (2006) give critical c and z values of 0.62 and 2.6, respectively. Species exceeding these values are deemed connectors or hubs of a network. The justification of these thresholds remains unclear to me. They may also not apply for the quantitative version.

References

Guimerà, R. and Amaral, L.A.N. (2005) Functional cartography of complex metabolic networks. Nature 433, 895--900.

Olesen, J.M., Bascompte, J., Dupont, Y.L. and Jordano, P. (2007) The modularity of pollination networks. Proceedings of the National Academy of Sciences of the USA 104, 19891-19896.

Examples

Run this code
if (FALSE) {
set.seed(2)
mod <- computeModules(memmott1999)
cz <- czvalues(mod)
plot(cz[[1]], cz[[2]], pch=16, xlab="c", ylab="z", cex=0.8, xlim=c(0,1), las=1)
abline(v=0.62) # threshold of Olesen et al. 2007
abline(h=2.5)   # dito
text(cz[[1]], cz[[2]], names(cz[[1]]), pos=4, cex=0.7)

# example for computing a c- or z-threshold:
mod <- computeModules(Safariland)
czobs <- czvalues(mod)
nulls <- nullmodel(Safariland, N=10) # this should be larger, of course
null.mod.list <- sapply(nulls, computeModules)
null.cz <- lapply(null.mod.list, czvalues)
# compute 95
null.cs <- sapply(null.cz, function(x) x$c) # c-values across all species in nulls
quantile(null.cs, 0.95) 
# this could now serve as thresholds for identifying particularly uncommonly high c-values
# and analogously for z, of course
}

Run the code above in your browser using DataLab