Make an artificial bipartite networks with some properties of ecological networks, then sample from it
Make an artificial bipartite networks with some properties of ecological networks, then sample from it
Core model adapted from: "Sampling bias is a challenge [...]: lessons from a quantitative nichemodel" by Jochen Frund, Kevin S. McCann and Neal M. Williams
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.
Returns
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.
Details
Abundances are assigned by generating abundances that match a log-normal distribution (but without introducing noise)