Skip to contents

Function to simulate species data following Minchin (1987). This functions generates species response functions, simulates environmental variables and simulates species assemblages based on species response functions and environmental variables. Users can supply own species parameters (e.g. when simulating calibration and fossil datasets) and own environmental variables.

Usage

make.set(ndim, n, elen, emean, edistr, ecor, cnt, spec, env, ...)

Arguments

ndim

Number of environmental variables to generate.

n

Number of samples to be generated.

elen

Range of the environmental variables. Single number or vector of length ndim.

emean

Mean of the environmental variables. Single number or vector of length ndim.

edistr

Distribution of the environmental variables. Currently 'uniform' and 'Gaussian' are supported.

ecor

Correlation matrix of the environmental variables. Object generated by cor.mat.fun. If omitted environmental variables are uncorrelated.

cnt

Count sum to be simulated.

spec

Users may supply their own species parameters.

env

Users may supply their own environmental variables.

...

Arguments passed to species

Value

List with three elements:

spp

Species abundance data.

env

Environmental variables used to simulate species abundance data.

spec

Species parameters.

References

Minchin, P.R. (1987) Multidimensional Community Patterns: Towards a Comprehensive Model. Vegetatio, 71, 145-156. doi:10.1007/BF00039167

Author

Mathias Trachsel and Richard J. Telford

Examples

calib <- make.set(
  nspp = 90, ndim = 3, Amax = runif, fun = runif,
  xpar = c(-50, 150), srange = 400, alpha = 4, gamma = 4,
  n = 100, elen = rep(100, 3), emean = rep(50, 3),
  edistr = "uniform", cnt = 1000
)

# Provide species parameters generated above, so that the fossil data use the
#    same species parameters.
fos <- make.set(
  ndim = 3, n = 100, elen = rep(100, 3), emean = rep(50, 3),
  edistr = "uniform", cnt = 1000, spec = calib$spec
)

# Supplying own environmental variables and species parameters.
env.vars <- make.env(100,
  elen = rep(100, 3), emean = rep(50, 3),
  edistr = "uniform", ndim = 3
)
fos <- make.set(cnt = 1000, spec = calib$spec, env = env.vars)