Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pop.sim

p-value simulation for presence-absence matrices clustering test


Description

Parametric bootstrap simulation of the p-value of a test of a homogeneity hypothesis against clustering (or significant nestedness). Designed for use within prabtest. The null model is defined by randpop.nb.

Usage

pop.sim(regmat, neighbors, h0c = 1, times = 200, dist = "kulczynski",
teststat = "isovertice", testc = NULL, geodist=NULL, gtf=0.1,
n.species = ncol(regmat),
specperreg = NULL, regperspec = NULL, species.fixed=FALSE, pdfnb=FALSE,
ignore.richness=FALSE)

Arguments

regmat

0-1-matrix. Columns are species, rows are regions.

neighbors

A list with a component for every region. The components are vectors of integers indicating neighboring regions. A region without neighbors (e.g., an island) should be assigned a list numeric(0).

h0c

numerical. Parameter p.nb for use in randpop.nb.

times

integer. Number of simulation runs.

dist

"kulczynski", "jaccard" or "geco", see kulczynski, geco and jaccard.

teststat

"isovertice", "lcomponent", "distratio", "nn" or "inclusions". See the corresponding functions, homogen.test for "isovertice", incmatrix for "inclusions").

testc

numerical. Tuning constant for the test statistics.

geodist

matrix of non-negative reals. Geographical distances between regions. Only used if dist="geco".

gtf

tuning constant for geco-distance if dist="geco", see "geco".

n.species

integer. Number of species.

specperreg

vector of integers. Numbers of species per region (is calculated from the data by default).

regperspec

vector of integers. Number of regions per species (is calculated from the data by default).

species.fixed

logical. If TRUE, the sizes of the species are taken directly from regmat. Otherwise, they are drawn by random from the empirical distribution of the values from regmat.

pdfnb

logical. Probability correction in randpop.nb.

ignore.richness

logical. If TRUE, there is no assumption of species richnesses to differ between regions in the null model. Regionwise probabilities don't differ in the generation of null data.

Value

List with components

results

vector of teststatistic values for the simulated matrices.

p.above

p-value if large test statistic leads to rejection.

p.below

p-value if small test statistic leads to rejection.

datac

test statistic value for the original data.

testc

see above.

Author(s)

References

Hennig, C. and Hausdorf, B. (2004) Distance-based parametric bootstrap tests for clustering of species ranges. Computational Statistics and Data Analysis 45, 875-896. http://stat.ethz.ch/Research-Reports/110.html.

Hausdorf, B. and Hennig, C. (2003) Biotic Element Analysis in Biogeography. Systematic Biology 52, 717-723.

Hausdorf, B. and Hennig, C. (2003) Nestedness of north-west European land snail ranges as a consequence of differential immigration from Pleistocene glacial refuges. Oecologia 135, 102-109.

See Also

Examples

options(digits=4)
data(kykladspecreg)
data(nb)
set.seed(1234)
pop.sim(t(kykladspecreg), nb, times=5, h0c=0.35, teststat="nn", testc=3)

prabclus

Functions for Clustering and Testing of Presence-Absence, Abundance and Multilocus Genetic Data

v2.3-2
GPL
Authors
Christian Hennig <christian.hennig@unibo.it>, Bernhard Hausdorf <Hausdorf@zoologie.uni-hamburg.de>
Initial release
2020-01-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.