make_true_and_sample_web {cassandRa}R Documentation

Make an artificial bipartite networks with some properties of ecological networks, then sample from it

Description

Core model adapted from: "Sampling bias is a challenge [...]: lessons from a quantitative nichemodel" by Jochen Frund, Kevin S. McCann and Neal M. Williams

Usage

make_true_and_sample_web(seed = NULL, specpar = 1, n_hosts = 10,
  n_wasps = 10, TargetTrueConn = 0.5, SampleObs = 1000,
  abun_mean = 5, abun_sdlog = 1, traitvsnested = 0.5,
  hosttrait_n = "two")

Arguments

seed

Random number generator seed, if specified.

specpar

Specialisation parameter, equal to 1/sd of the normal curve that defines the consumption range

n_hosts

Number of focal level species (e.g. hosts, flowers)

n_wasps

Number of non-focal level species (e.g. parasitic wasps, pollinators)

TargetTrueConn

Proportion of possible interactions to keep

SampleObs

Number of samples to draw

abun_mean

Mean abundance level (log scale).

abun_sdlog

Distributon of abundance level (SD log scale).

traitvsnested

The relative balance between the nestedness generator and the trait-based generator

hosttrait_n

Number of trait dimensions. Default 'two', uses two traits, with one dominant. 'single' and 'multi' retained from Frund et al.

Details

Abundances are assigned by generating abundances that match a log-normal distribution (but without introducing noise)

Value

A network list containing 'obs' a matrix of observations, 'TrueWeb' a matrix of the 'true'] drawn web, and number of other properties of these networks.

Examples

make_true_and_sample_web()

[Package cassandRa version 0.1.0 Index]