Learn R Programming

vegan (version 1.11-0)

oecosimu: Nestedness and Null Models for Islands or Patches

Description

Patches or local communities are regarded as nested if they all could be subsets of the same community. In general, species poor communities should be subsets of species rich communities, and rare species should only occur in species rich communities. Null models generate random communities with different criteria to study the significance of nestedness.

Usage

oecosimu(comm, nestfun, method, nsimul = 99, burnin = 0, thin = 1, ...)
nestedchecker(comm)
nestedn0(comm)
nesteddisc(comm)
commsimulator(x, method, thin=1)

Arguments

comm
Community data.
nestfun
Function to analyse nestedness. Some functions are provided in vegan, but any function can be used if it accepts the community as the first argument, and returns the result in item statistic. See Examples for defining your ow
method
Null model method. See details.
nsimul
Number of simulated null communities.
burnin
Number of null communities discarded before proper analysis in sequential methods "swap" and "tswap".
thin
Number of discarded null communities between two evaluations of nestedness statistic in sequential methods "swap" and "tswap".
x
Matrix for commsimulator.
...
Other arguments to functions.

Value

  • Function oecosimu returns the result of nestfun with one added component called oecosimu. The oecosimu component contains the simulated values of the statistic (item simulated), the name of the method, two-sided $P$ value and z-value of the statistic. The result returned by nestedness function must contain item called statistic, but the other components differ among functions. The commsimulator returns a null model matrix or a swap of the input matrix.

encoding

UTF-8

Details

Function oecosimu is a wrapper that evaluates a nestedness statistic using function given by nestfun, and then simulates a series of null models using commsimulator, and evaluates the nestedness statistic on these null models. The vegan packages contains some nestedness functions that are described below, and the generation of null models is described towards the end of this section.

Function netstedchecker gives the number of checkerboard units, or 2x2 submatrices where both species occur once but on different sites (Stone & Roberts 1990). Function nestedn0 implements nestedness measure N0 which is the number of absences from the sites which are richer than the most pauperate site species occurs (Patterson & Atmar 1986). Function nesteddisc implements discrepancy index which is the number of ones that should be shifted to fill a row with ones in a table arranged by species frequencies (Brualdi & Sanderson 1999).

In addition to these functions provided in vegan, any function can be used that takes comm as the first argument, and returns the nestedness index in item statistic. Function chisq.test is such a function, and examples show how to do this in general. If you write a function that may be useful to others, please consider submitting it to vegan for others to enjoy (you will be credited as an author of that function).

Function commsimulator implements null models for community composition. The implemented models are r00 which maintains the number of presences but fills these anywhere so that neither species (column) nor site (row) totals are preserved. Methods r0, r1 and r2 maintain the site (row) frequencies. Method r0 fills presences anywhere on the row with no respect to species (column) frequencies, r1 uses column marginal frequencies as probabilities, and r2 uses squared column sums. Methods r1 and r2 try to simulate original species frequencies, but they are not strictly constrained. All these methods are reviewed by Wright et al. (1998). Method c0 maintains species frequencies, but does not honour site (row) frequencies (Jonsson 2001).

The other methods maintain both row and column frequencies. Methods swap and tswap inspect random 2x2 submatrices and if they are checkerboard units, the order of columns is swapped. This changes the matrix structure, but does not influence marginal sums (Gotelli & Entsminger 2003). Method swap inspects submatrices so long that a swap can be done. Miklós{Miklos} & Podani (2004) suggest that this may lead into biased sequence, since some columns or rows may be more easily swapped, and they suggest trying a fixed number of times and doing zero to many swaps at one step. This method is implemented by method tswap or trial swap. Function commsimulator makes only one trial swap in time (which probably does nothing), but oecosimu estimates how many submatrices are expected before finding a swappable checkerboard, and uses that ratio to thin the results, so that on average one swap will be found per step of tswap. However, the checkerboard frequency probably changes during swaps, but this is not taken into account in estimating the thin. Both swap methods are sequential, and the result of the swap is used as the input of the next swap. One swap still changes the matrix only little, and it may be useful to thin the results so that the statistic is only evaluated after thin steps.

Method backtracking implements a filling method with constraints both for row and column frequencies (Gotelli & Entsminger 2001). The matrix is first filled randomly using row and column frequencies as probabilities. Typically row and column sums are reached before all incidences are filled in. After that begins backtracking, where some of the points are removed, and then filling is started again, and this backtracking is done so may times that all incidences will be filled into matrix. Method quasiswap (Miklós{Miklos} & Podani 2004) implements a method where matrix is first filled honouring row and column totals, but with integers that may be larger than one. Then the method inspects random 2x2 matrices and performs a quasiswap on them. Quasiswap is similar to ordinary swap, but it also can reduce numbers above one to ones maintaining marginal totals. The quasiswap method is not sequential, but it produces a random incidence matrix with given marginal totals.

References

Brualdi, R.A. & Sanderson, J.G. (1999). Nested species subsets, gaps, and discrepancy. Oecologia 119, 256--264.

Gotelli, N.J. & Entsminger, N.J. (2001). Swap and fill algorithms in null model analyis: rethinking the knight's tour. Oecologia 129, 281--291.

Gotelli, N.J. & Entsminger, N.J. (2003). Swap algorithms in null model analysis. Ecology 84, 532--535.

Jonsson, B.G. (2001) A null model for randomization tests of nestedness in species assemblages. Oecologia 127, 309--313.

Miklós{Miklos}, I. & Podani, J. (2004). Randomization of presence-absence matrices: comments and new algorithms. Ecology 85, 86--92. Patterson, B.D. & Atmar, W. (1986). Nested subsets and the structure of insular mammalian faunas and archipelagos. Biol. J. Linnean Soc. 28, 65--82.

Stone, L. & Roberts, A. (1990). The checkerboard score and species distributions. Oecologia 85, 74--79.

Wright, D.H., Patterson, B.D., Mikkelson, G.M., Cutler, A. & Atmar, W. (1998). A comparative analysis of nested subset patterns of species composition. Oecologia 113, 1--20.

See Also

r2dtable generates table with given marginals but with entries above one. Function rndtaxa (labdsv package) randomizes a community table.

Examples

Run this code
data(sipoo)
nestedchecker(sipoo)
## Use the first eigenvalue of correspondence analysis as an index
## of structure: a model for making your own functions.
## This is a minimal structure; fancier functions give fancier results
caeval <- function(x) list(statistic = decorana(x, ira=1)$evals[1])
out <- oecosimu(sipoo, caeval, "swap", burnin=100, thin=5)
out
## Inspect the swap sequence
plot(out$oecosimu$simulated, type="l")

Run the code above in your browser using DataLab