GradLocs | R Documentation |
Functions to automated simulation routines using coenocliner package.
GradLocs(n, xrange, yrange)
GradMul(xy, xmul, ymul)
BinomGaussPar(nsp, xrange, yrange, buffer = 2, tsd = 0.1)
Gauss2betaPar(gausspar, shape = c(0.5, 6.5), cover = 0.95)
DropMissingSpec(comm)
coenorun1(sim, tot = 1, family = "binomial", far = 4, trace = TRUE)
n |
Number of SUs. |
xrange , yrange |
Desired range of gradients. |
xy |
Gradient locations in two dimensions. |
xmul , ymul |
Multipliers for each gradient |
nsp |
Number of species. |
buffer |
Width of buffer zone for optima surrounding ranges. |
tsd |
Standard deviation of tolerance in log-Normal distribution, in log scale |
gausspar |
Gaussian response parameters for species as
returned by |
shape |
Random log-uniform range of shape parameters |
cover |
Find range of beta response so that the same span covers the same proportion of 1-dim integral as the Gaussian response function. |
comm |
Community data. |
sim |
One simulated community. |
tot |
Binomial total in |
family |
Error family passed to |
far |
Weirdness limit passed to |
trace |
Print tracing information. If |
GradLocs
: Gradient Locations
GradMul
: Multiply input gradient which
presumably is a unit square
BinomGaussPar
: Gaussian Parameters for Binomial Response.
Gauss2betaPar
: Translate Gaussian parameters into
corresponding beta response parameters.
DropMissingSpec
: Drop missing species from the data.
coenorun1
: Takes one simulated community for
ordination with GO, NMDS, CA and DCA and returns average Procrustes
precision
Jari Oksanen
require(coenocliner) || stop("examples need 'coenocliner' package")
## small simulation
nsim <- 10
npoints <- 50
## generate a set of species parameters over the maximum extent
sp <- replicate(nsim, BinomGaussPar(800, 8, 4))
## sample much narrower proportion of the space
xy <- replicate(nsim, GradLocs(npoints, 3, 2))
## Simulations: these can be easily parallelized using mclapply
## (Linux, Mac) or parSapply (all).
sapply(seq_len(nsim), function(i)
coenorun1(coenocline(xy[,,i], "gaussian", sp[,i],
countModel="bernoulli")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.