generate.Artificial.Data {STEPCAM}R Documentation

Generate Artifical data that can be used by the STEPCAM model

Description

This function generates artifical data with a given number of species, traits and communities. The generated data can directly be used in STEPCAM-ABC inference.

Usage

generate.Artificial.Data(n_species, n_traits, n_communities,
occurence_distribution, average_richness, sd_richness, mechanism_random)

Arguments

n_species

The number of species in the species pool (so across all communities) of the desired dataset.

n_traits

The number of traits in the desired dataset.

n_communities

The number of communities in the desired dataset.

occurence_distribution

species occurrence distribution (analogous to species abundance distribution) in species pool. A lognormal distribution is assumed. The higher the value, the more uneven the occurrence distribution in the species pool

average_richness

average richness in local community as a proportion of richness in species pool

sd_richness

standard deviation in richness across communities

mechanism_random

if TRUE, species are randomly drawn from from species pool. If FALSE, it is assumed that a certain trait combination is optimal in each community and species with traits similar to this optimum more likely end up in the local community. Therefore, random.mechanism = FALSE assumes filtering processes to be most dominant in community assembly

Value

traits

A matrix containing the traits for all species, rows are the different species, column correspond to the respective traits.

abundances

A matrix containing the abundances of all species for all plots. Rows correspond to species, columns to plots.

Author(s)

Fons van der Plas

Examples

Artificial.Data <- generate.Artificial.Data(n_species=40, n_traits=3, n_communities = 5,
                   occurence_distribution = 0.2, average_richness = 0.5, sd_richness = 0.2,
                   mechanism_random = FALSE)

[Package STEPCAM version 1.2 Index]