regpop.sar {prabclus} | R Documentation |
Simulation of abundance matrices (non-clustered)
Description
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.
Usage
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)
Arguments
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 |
Value
A matrix of abundance values, rows are regions, columns are species.
Author(s)
Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en
References
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.
See Also
autoconst
estimates p.nb
from matrices of class
prab
. These are generated by prabinit
.
abundtest
uses regpop.sar
as a null model for
tests of clustering.
randpop.nb
(analogous function for simulating
presence-absence data)
Examples
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))