Simulation of abundance matrices (non-clustered)
Generates a simulated matrix where the rows are interpreted as regions
and the columns as species, and the entries are abundances.
Species are generated i.i.d. in two steps. In the first step, a
presence-absence matrix is generated as in randpop.nb
. In the
second step, conditionally on presence in the first step, abundance
values are generated according to a simultaneous autoregression (SAR)
model for the log-abundances (see errorsarlm
for
the model; estimates are provided by the parameter
sarestimate
). Spatial autocorrelation of a species' presences
is governed by the parameter p.nb
, sarestimate
and a
list of neighbors for each region.
regpop.sar(abmat, prab01=NULL, sarestimate=prab.sarestimate(abmat), p.nb=NULL, vector.species=prab01$regperspec, pdf.regions=prab01$specperreg/(sum(prab01$specperreg)), count=FALSE)
abmat |
object of class |
prab01 |
presence-absence matrix of same dimensions than the
abundance matrix of |
sarestimate |
Estimator of the parameters of a simultaneous
autoregression model corresponding to the null model for abundance
data from Hausdorf and Hennig (2007) as generated by
|
p.nb |
numeric between 0 and 1. The probability that a new
region is drawn from the non-neighborhood of the previous regions
belonging to a species under generation. If |
vector.species |
vector of integers. |
pdf.regions |
numerical vector of length |
count |
logical. If |
A matrix of abundance values, rows are regions, columns are species.
Hausdorf, B. and Hennig, C. (2007) Null model tests of clustering of species, negative co-occurrence patterns and nestedness in meta-communities. Oikos 116, 818-828.
abundtest
uses regpop.sar
as a null model for
tests of clustering.
randpop.nb
(analogous function for simulating
presence-absence data)
options(digits=4) data(siskiyou) set.seed(1234) x <- prabinit(prabmatrix=siskiyou, neighborhood=siskiyou.nb, distance="none") # Not run; this needs package spdep. # regpop.sar(x, p.nb=0.046) regpop.sar(x, p.nb=0.046, sarestimate=prab.sarestimate(x,sar=FALSE))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.