s2bakSim: Simulate example data for fitting SDMs and S2BaK

View source: R/s2bakSim.R

s2bakSimR Documentation

Simulate example data for fitting SDMs and S2BaK

Description

This function simulates the data needed for fitting SDMs for multiple species including generated trait and environments. The function is to primarily to illustrate the data structure, as well as demonstration of the package functions.

Usage

s2bakSim(
  species = 30,
  sites = 3000,
  surv = 300,
  minimum.sightings = 30,
  env.prob = c(0.5, 1),
  trait.prob = c(0.5, 1),
  max.iter = 100
)

Arguments

species

numeric. The number of species used for fitting

sites

numeric. The number of environment sites in the dataset for species sightings

surv

numeric. The number of survey sites

minimum.sightings

numeric. The function will re-generate a new species until the minimum number of sightings (and survey presences) is greater than or equal to the provided value.

env.prob

numeric vector of size two for the range of probabilities for establishment given environment

trait.prob

numeric vector for the range of probabilities for establishment given species trait

max.iter

numeric. Number of attempts to generate a given species if the number of presences is less than the minimum.

Value

a list of data.frames for the environment of the sightings, the environment of the surveys, species traits, species sightings, and the survey presences.

Examples

## See ?fit.s2bak


leung-lab/s2bak documentation built on March 1, 2023, 9:10 a.m.