Function to setup and run the niche filling simulation
A named list containing three named list elements:
See Parameter List section for details on what parameters are in which lists.
A logical determining whether the simulation should save intermediate states of the phylogeny during the simulation run
Print progress bar if TRUE.
A logical determining whether the simulation should save all trait evolution histories. Set to FALSE if you are only interested in the end state of the simulation in order to save memory.
A niche_fill_sim object containing the final simulation object, a set of intermediate phylogenies, and the parameters used to run the simulation
There are three named lists in the
parms parameter, relating to the
carrying capacity, the competition, and the macroevolutionary model. The parameters found
in each one are as follows:
h0: Total maximum height of the carrying capacity landscape
hz: Maximum height of each of u peaks in the landscape; vector of length u
biz: Centre of each of u peaks in the landscape for each of d dimensions;
matrix of dimension d by u
sigiz: Width of each of u peaks for each of d dimensions; matrix of length d by u
Piz: Super-gaussian parameter for each of u peaks for each of d dimensions;
matrix of dimension d by u
sig0i: Total width of landscape in all dimensions; determines how far from zero the carrying capacity
drops off to nearly zero; vector of length d
P0i: Total super-gaussian parameter; determines how quickly or gradually the carrying
capacity drops off near the landscape borders in each dimension. Higher values give more extreme drop-offs;
vector of length d
a: Minimum values of carrying capacity within landscape limits
c_var: Variance of the deviations added to each species carrying capacity.
If this is zero, no deviations are added. The purpose of this is to ensure no two species occupying
the same niche position can have exact fitness equivalence, which can lead to infinite coexistence.
New deviates are drawn after every simulation event, to simulate demographic stochasticity.
gamma_i: Strength of competition - influence; determines how quickly the competition
strength between two species drops off with increasing distance between their niche
trait values; vector of length d, where d is the number of niche dimensions
D_i: Super-gaussiain parameter for competition; this parameter controls
how the precipitously the competition strength drops off with increasing niche distance.
Higher values lead to a more cliff-like competition kernel, with strong competition
between highly similar species, then very little competition beyond some threshold
C: Strength of competition - max competition; determines the maximum
competition between two species as a proportion of competition within species (which is always 1)
b_rate: Pure birth rate for phylogeny simulation; the rate at which new species
form by splitting
init_traits: Initial trait values for ancestral species; vector of length
n_traits, where n_traits is the number of traits being simulated
e_var: Evolutionary rates for all traits; vector of length n_traits
init_Ns: Starting population sizes for two initial species in simulation,
after first split with ancestral species; vector of length 2
init_br: Time to ancestral species for initial speciation split
check_extinct: Rate at which to check for species whose population size
has dropped below a threshold (currently hard-coded), which are then set as extinct
tot_time: The total amount of time to run the simulation in simulation time
V_gi: Mutation rate for niche trait evolution; determines how quickly
traits can evolve in the trait evolution simulation; typically this is set very low
so that evolution proceeds much slower than population dynamics; vector of length n_trait
mult: Multiplier that determines how much traits 'jump' in trait space
after a speciation event. This is a multiple of
e_var, and is the standard deviation
of a normal deviate that is added to all traits.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.