DAISIE_sim_constant_rate_shift: Simulate islands with given parameters.

Description Usage Arguments Value Author(s) References See Also

View source: R/DAISIE_sim_constant_rate_shift.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
DAISIE_sim_constant_rate_shift(
  time,
  M,
  pars,
  replicates,
  divdepmodel = "CS",
  nonoceanic_pars = c(0, 0),
  num_guilds = NULL,
  sample_freq = 25,
  plot_sims = TRUE,
  hyper_pars = NULL,
  area_pars = NULL,
  dist_pars = NULL,
  shift_times = NULL,
  verbose = TRUE,
  ...
)

Arguments

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:

  • pars[1]: lambda^c (cladogenesis rate)

  • pars[2]: mu (extinction rate)

  • pars[3]: K (carrying capacity), set K=Inf for diversity independence.

  • pars[4]: gamma (immigration rate)

  • pars[5]: lambda^a (anagenesis rate)

  • pars[6]: lambda^c (cladogenesis rate) for either type 2 species or rate set 2 in rate shift model

  • pars[7]: mu (extinction rate) for either type 2 species or rate set 2 in rate shift model

  • pars[8]: K (carrying capacity) for either type 2 species or rate set 2 in rate shift model, set K=Inf for diversity independence.

  • pars[9]: gamma (immigration rate) for either type 2 species or rate set 2 in rate shift model

  • pars[10]: lambda^a (anagenesis rate) for either type 2 species or rate set 2 in rate shift model

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:

  • [1]: the probability of sampling a species from the mainland

  • [2]: the probability of the species sampled from the mainland being nonendemic

num_guilds

The number of guilds on the mainland. The number of mainland species is divided by the number of guilds when divdepmodel = "GW"

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.

hyper_pars

A named list of numeric hyperparameters for the rate calculations as returned by create_hyper_pars:

  • [1]: is d_0 the scaling parameter for exponent for calculating cladogenesis rate

  • [2]: is x the exponent for calculating extinction rate

  • [3]: is alpha, the exponent for calculating the immigration rate

  • [4]: is beta the exponent for calculating the anagenesis rate.

area_pars

A named list containing area and sea level parameters as created by create_area_pars:

  • [1]: maximum area

  • [2]: value from 0 to 1 indicating where in the island's history the peak area is achieved

  • [3]: sharpness of peak

  • [4]: total island age

  • [5]: amplitude of area fluctuation from sea level

  • [6]: frequency of sine wave of area change from sea level

  • [7]: angle of the slope of the island

dist_pars

A named list of a numeric distance from the mainland as created by create_dist_pars:

  • [1]: is D distance from the mainland

shift_times

a numeric vector specifying when the rate shifts occur before the present.

verbose

In simulation and dataprep functions a logical, Default = TRUE gives intermediate output should be printed. For ML functions a numeric determining if intermediate output should be printed, Default = 0 does not print, verbose = 1 prints intermediate output of the parameters and loglikelihood, verbose = 2 means also intermediate progress during loglikelihood computation is shown.

...

Any arguments to pass on to plotting functions.

Value

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

Author(s)

Luis Valente and Albert Phillimore

References

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.

See Also

DAISIE_format_CS DAISIE_plot_sims


xieshu95/DAISIE_new documentation built on March 20, 2020, 5:31 a.m.