update_rates: Calculates algorithm rates

Description Usage Arguments Value See Also

View source: R/DAISIE_rates.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
update_rates(
  timeval,
  totaltime,
  gam,
  laa,
  lac,
  mu,
  hyper_pars = hyper_pars,
  area_pars = NULL,
  dist_pars = NULL,
  ext_pars = NULL,
  island_ontogeny = NULL,
  sea_level = NULL,
  extcutoff,
  K,
  num_spec,
  num_immigrants,
  mainland_n,
  trait_pars = NULL,
  island_spec = NULL
)

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

laa

A numeric with the per capita anagenesis rate

lac

A numeric with the per capita cladogenesis rate

mu

extinction rate

hyper_pars

A numeric vector for hyperparameters for the rate calculations:

  • [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

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 string describing the type of island ontogeny. Can be NULL, "beta" 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 K (clade-specific 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

A numeirc with the total number of species present in the mainland

trait_pars

A named list containing diversification rates considering two trait states:

  • [1]:A numeric with the per capita transition rate with state1

  • [2]:A numeric with the per capita immigration rate with state2

  • [3]:A numeric with the per capita extinction rate with state2

  • [4]:A numeric with the per capita anagenesis rate with state2

  • [5]:A numeric with the per capita cladogenesis rate with state2

  • [6]:A numeric with the per capita transition rate with state2

  • [7]:A numeric with the number of species with trait state 2 on mainland

island_spec

Matrix with current state of simulation containing number of species.

Value

a named list with the updated effective rates.

See Also

update_max_rates

Other rate calculations: DAISIE_plot_area(), get_ana_rate(), get_ext_rate(), get_immig_rate(), island_area_vector(), island_area(), update_max_rates()


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