Description Usage Arguments Value Author(s) References See Also Examples
View source: R/abundfunctions.R
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
presenceabsence 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 logabundances (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.
1 2 3 4 5  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 
presenceabsence 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 nonneighborhood 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.
Christian Hennig ch[email protected] http://www.homepages.ucl.ac.uk/~ucakche
Hausdorf, B. and Hennig, C. (2007) Null model tests of clustering of species, negative cooccurrence patterns and nestedness in metacommunities. Oikos 116, 818828.
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
presenceabsence data)
1 2 3 4 5 6 7 8  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))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.