update_max_rates: Calculates the maximum rates for a Gillespie simulation

Description Usage Arguments Value See Also

View source: R/DAISIE_max_rates.R

Description

Internal function that updates the all the max rates at time t.

Usage

1
2
3
4
update_max_rates(timeval, totaltime, gam, mu, laa, lac, ddmodel_sim,
  hyper_pars = NULL, area_pars, dist_pars = NULL, ext_pars = NULL,
  island_ontogeny = NULL, sea_level = NULL, extcutoff, K, num_spec,
  num_immigrants, mainland_n)

Arguments

timeval

A numeric with the current time of simulation

totaltime

A numeric with the total time of simulation

gam

A numeric with the per capita immigration rate

mu

A numeric with the per capita extinction rate

laa

A numeric with the per capita anagenesis rate

lac

A numeric with the per capita cladogenesis rate

ddmodel_sim

A numeric determining which parameters are diversity- dependent.

hyper_pars

A numeric vector for hyperparameters for the rate calculations, hyper_pars[1] is d_0 the scaling parameter for exponent for calculating cladogenesis rate, hyper_pars[2] is x the exponent for calculating extinction rate, hyper_pars[3] is alpha the exponent for calculating the immigration rate, hyper_pars[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

dist_pars

a numeric for the distance from the mainland.

ext_pars

a numeric vector:

  • [1]: minimum extinction when area is at peak

  • [2]: extinction rate when current area is 0.10 of maximum area

island_ontogeny

a numeric describing the type of island ontogeny. Can be NULL, 1 for a beta function describing area through time.

sea_level

a numeric describing the type of sea level.

extcutoff

A numeric with the cutoff for extinction rate preventing it from being too large and slowing down simulation. Should be big.

K

a numeric with carrying capacity

num_spec

a numeric with the current number of species.

num_immigrants

a numeric with the current number of non-endemic species (a.k.a non-endemic species).

mainland_n

number of mainland species

Value

a named list with the updated effective rates.

See Also

update_rates

Other rates calculation: DAISIE_plot_area, get_ana_rate, get_ext_rate, get_immig_rate, get_t_hor, get_trans_rate, island_area_vector, island_area, update_rates


xieshu95/match_new_algorithm documentation built on Dec. 4, 2019, 12:41 a.m.