Description Usage Arguments Value Author(s) References See Also Examples
View source: R/DAISIE_sim_trait_dependent.R
This function simulates islands with given cladogenesis, extinction, Kprime, immigration and anagenesis parameters. If a single parameter set is provided (5 parameters) it simulates islands where all species have the same macro-evolutionary process. If two paramater sets (10 parameters) are provided, it simulates islands where two different macro-evolutionary processes operate, one applying to type 1 species and other to type 2 species. If two parameter sets and a time shift (11 parameters) are provided, it simulates islands where at the given time a shift between the parameter sets will occur.
Returns R list object that contains the simulated islands
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | DAISIE_sim_trait_dependent(
time,
M,
pars,
replicates,
divdepmodel = "CS",
nonoceanic_pars = c(0, 0),
num_guilds = NULL,
sample_freq = 25,
plot_sims = TRUE,
island_ontogeny = "const",
sea_level = "const",
hyper_pars = NULL,
area_pars = NULL,
dist_pars = NULL,
ext_pars = NULL,
extcutoff = 1000,
verbose = TRUE,
trait_pars = NULL,
...
)
|
time |
Numeric defining the length of the simulation in time units. For examples, if an island is known to be 4 million years old, setting time = 4 will simulate the entire life span of the island; setting time = 2 will stop the simulation at the mid-life of the island. |
M |
Numeric defining the size of mainland pool, i.e. the number of species that can potentially colonize the island. |
pars |
A numeric vector containing the model parameters:
The elements 6:10 are required only when type 2 species are included or in the rate shift model. |
replicates |
Number of island replicates to be simulated. |
divdepmodel |
Option divdepmodel = 'CS' runs a model with clade-specific carrying capacity, where diversity-dependence operates only within single clades, i.e. only among species originating from the same mainland colonist. Option divdepmodel = 'IW' runs a model with island-wide carrying capacity, where diversity-dependence operates within and among clades. Option divdepmodel = 'GW' runs a model with diversity-dependence operates within a guild. |
nonoceanic_pars |
A vector of length two with:
|
num_guilds |
The number of guilds on the mainland. The number of
mainland species is divided by the number of guilds when |
sample_freq |
Numeric specifing the number of units times should be divided by for plotting purposes. Larger values will lead to plots with higher resolution, but will also run slower. |
plot_sims |
Default = TRUE plots species-through-time (STT) plots. It detects how many types of species are present. If only one type of species is present, STT is plotted for all species. If two types are present, three plots are produced: STT for all, STT for type 1 and STT for type 2. |
island_ontogeny |
In |
sea_level |
In |
hyper_pars |
A named list of numeric hyperparameters for the rate
calculations as returned by
|
area_pars |
A named list containing area and sea level parameters as
created by
|
dist_pars |
A named list of a numeric distance from the mainland as
created by
|
ext_pars |
A numeric vector:
|
extcutoff |
A numeric with the cutoff for the the maximum extinction rate preventing it from being too large and slowing down simulation. |
verbose |
In simulation and dataprep functions a logical,
|
trait_pars |
A named list containing diversification rates considering
two trait states created by
|
... |
Any arguments to pass on to plotting functions. |
Each simulated dataset is an element of the list, which can be
called using [[x]]. For example if the object is called island_replicates,
the last replicates is a list in itself. The first (e.g.
island_replicates[[x]][[1]]
) element of that list has the following
components:
$island_age
- the island age
Then, depending on
whether a distinction between types is made, we have:
$not_present
- the number of mainland lineages that are not present on the island
or:
$not_present_type1
- the number of mainland lineages of type 1
that are not present on the island
$not_present_type2
- the
number of mainland lineages of type 2 that are not present on the island
$stt_all
- STT table for all species on the island (nI - number of
non-endemic species; nA - number of anagenetic species, nC - number of
cladogenetic species, present - number of independent colonisations present
)
$stt_stt_type1
- STT table for type 1 species on the island -
only if 2 types of species were simulated (nI - number of non-endemic
species; nA - number of anagenetic species, nC - number of cladogenetic
species, present - number of independent colonisations present )
$stt_stt_type2
- STT table for type 2 species on the island - only if
2 types of species were simulated (nI - number of non-endemic species; nA -
number of anagenetic species, nC - number of cladogenetic species, present -
number of independent colonisations present )
$brts_table
- Only
for simulations under 'IW'. Table containing information on order of events
in the data, for use in maximum likelihood optimization.)
The subsequent elements of the list each contain information on a single
colonist lineage on the island and has 4 components:
$branching_times
- island age and stem age of the population/species
in the case of Non-endemic, Non-endemic_MaxAge and Endemic anagenetic
species. For cladogenetic species these should be island age and branching
times of the radiation including the stem age of the radiation.
$stac
- the status of the colonist
* Non_endemic_MaxAge: 1
*
ndemic: 2
* Endemic&Non_Endemic: 3
* Non_endemic: 4
$missing_species
- number of island species that were not sampled for
particular clade (only applicable for endemic clades)
$type_1or2
- whether the colonist belongs to type 1 or type 2
Luis Valente and Albert Phillimore
Valente, L.M., A.B. Phillimore and R.S. Etienne (2015). Equilibrium and non-equilibrium dynamics simultaneously operate in the Galapagos islands. Ecology Letters 18: 844-852. Hauffe, T., D. Delicado, R.S. Etienne and L. Valente (submitted). Lake expansion increases equilibrium diversity via the target effect of island biogeography.
DAISIE_format_CS
DAISIE_plot_sims
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ##### Ontogeny simulation with 5 replicates ######
n_mainland_species <- 1000
island_age <- 0.4
clado_rate <- 0.0001 # cladogenesis rate
ext_rate <- 2.683454548 # extinction rate (not used)
clade_carr_cap <- 0.05 # clade-level carrying capacity
imm_rate <- 0.001 # immigration rate
ana_rate <- 0.1 # anagenesis rate
max_area <- 1000
peak_time <- 0.1
sharpness <- 1
total_island_age <- 10
sea_level_amplitude <- 0
sea_level_frequency <- 0
island_gradient_angle <- 0
mu_min <- 0.5
mu_max <- 100
island_ontogeny <- "beta"
sea_level <- "const"
extcutoff <- 1000
out <- DAISIE_sim_time_dependent(
time = island_age,
M = n_mainland_species,
pars = c(clado_rate, ext_rate, clade_carr_cap, imm_rate, ana_rate),
replicates = 5,
island_ontogeny = island_ontogeny,
sea_level = sea_level,
area_pars = create_area_pars(max_area,
peak_time,
sharpness,
total_island_age,
sea_level_amplitude,
sea_level_frequency,
island_gradient_angle),
ext_pars = c(mu_min, mu_max),
extcutoff = extcutoff,
plot_sims = TRUE,
verbose = TRUE
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.