teststat below) will be
prabmatrix <- prabinit(file="path/prabmatrixfile",
neighborhood="path/neighborhoodfile")
test <- prabtest(prabmatrix)
summary(test)
Note: Data formats are described
on the prabinit help page. You may also consider the example datasets
kykladspecreg.dat and nb.dat. Take care of the
parameter rows.are.species of prabinit.prabtest(prabobject, teststat = "distratio", tuning = switch(teststat,
distratio = 0.25, lcomponent = floor(3 * ncol(prabobject$distmat)/4),
isovertice = ncol(prabobject$distmat), nn = 4, NA), times = 1000,
pd = NULL, prange = c(0, 1), nperp = 4, step = 0.1, step2=0.01,
twostep = TRUE,
sf.sim = FALSE, sf.const = sf.sim, pdfnb = FALSE, ignore.richness=FALSE)
## S3 method for class 'prabtest':
summary(object, above.p=object$teststat \%in\%
c("groups","inclusions","mean"),
group.outmean=FALSE,...)
## S3 method for class 'summary.prabtest':
print(x, ...)
prab (presence-absence data), as
generated by prabinit."isovertice":
number of isolated vertices in the graph of tuning
smallest distances
between species. "lcomponent": size of largest connectivity
component in thiteststat="distratio") numerical
between 0 and 1. Tuning constant for test statistics, see
teststat.NA (the default),
prabtest estimates this by functionpd is to be found. Used
by function autoconst.pd-value. Used
by function autoconst.pd for the first simulation. Used
by function autoconst.pd for the second simulation (see
parameter twostep). Used
by function autoconst.TRUE, a first estimation step for
pd is
carried out in the whole prange, and then the final
estimation is determined between the preliminary estimator
-5*step2 and +5*stTRUE) or generated from their empirical
distribution in x (FALSE). See function randpop.nb.sf.sim, but for estimation of
pd by autoconst.TRUE, the probabilities of the regions
are modified according to the number of neighboring regions in
randpop.nb, see Hennig and Hausdorf (2002), p. 5. This is
usually no improvement.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.prabtest.TRUE means that for output from
abundtest the p-value is
p.above, otherwise p.below.TRUE and
object$teststat="groups", statistics concerning the mean of
all dissimilarities are given out by print.summary.prabtest.summary.prabtest.prabtest prodices
an object of class prabtest, which is a list with componentsautoconst.prabinit.distance="geco"), see prabinit.summary.prabtest produces an object of class
summary.prabtest, which is a list with componentsobject.object.object, see prabtest and abundtest.object$teststat="groups", components
rrangeg (matrix of group-wise ranges of test statistic
value), rmeang (vector of group-wise means of test statistic
value), rrangem (range over simulations of overall mean of
within-group dissimilarities), rmeanm (mean over simulations
of overall mean of within-group dissimilarities) are added to the
list object$groupinfo, and this is given out.pd
(estimated by autoconst) and the distribution on the regions
induced by the relative species numbers are taken. With these
parameters, times populations according to the null model
implemented in randpop.nb are generated and the test statistic
is evaluated. The resulting p-value is number of simulated statistic
values more extreme than than the value of the original data+1
divided by times+1. "More extreme" means smaller for
"lcomponent", "distratio", "nn", larger for
"inclusions", and
twice the smaller number between the original statistic value and the
"border", i.e., a two-sided test for "isovertice".
If pd=NA was
specified, a diagnostic plot
for the estimation of pd is plotted by autoconst.
For details see Hennig
and Hausdorf (2004) and the help pages of the cited functions.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.
prabinit generates objects of class prab.
autoconst estimates pd from such objects.
randpop.nb generates populations from the null model.
An alternative model is given by cluspop.nb. Some more information on the test statistics is given in
homogen.test, lcomponent,
distratio, nn,
incmatrix.
The simulations are computed by pop.sim.
data(kykladspecreg)
data(nb)
set.seed(1234)
x <- prabinit(prabmatrix=kykladspecreg, neighborhood=nb)
# If you want to use your own ASCII data files, use
# x <- prabinit(file="path/prabmatrixfile",
# neighborhood="path/neighborhoodfile")
kpt <- prabtest(x, times=5, pd=0.35)
# These settings are chosen to make the example execution
# a bit faster; usually you will use prabtest(kprab).
summary(kpt)Run the code above in your browser using DataLab