create_default_pars: Creates standard metaparameters to defaults when NULL

Description Usage Arguments Value Author(s) Examples

View source: R/create_pars.R

Description

Creates standard metaparameters to defaults when NULL

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
create_default_pars(
  island_ontogeny = 0,
  sea_level = 0,
  area_pars = NULL,
  hyper_pars = NULL,
  dist_pars = NULL,
  ext_pars = NULL,
  totaltime,
  pars
)

Arguments

island_ontogeny

In DAISIE_sim_time_dependent, DAISIE_ML_CS and plotting a string describing the type of island ontogeny. Can be "const", "beta" for a beta function describing area through time. String checked by is_island_ontogeny_input.
In all other functions a numeric describing the type of island ontogeny. Can be 0 for constant, 1 for a beta function describing area through time. In ML functions island_ontogeny = NA assumes constant ontogeny.

sea_level

In DAISIE_sim_time_dependent and plotting a string describing the type of sea level. Can be "const" or "sine" for a sine function describing area through time. String checked by is_sea_level_input.
In all other functions a numeric describing the type of sea level. Can be 0 for constant, 1 for a sine function describing area through time.

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

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.

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

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

totaltime

Numeric defining the length of the simulation in time units.

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.

Value

Named list with standard parameters and metaparameters needed by DAISIE.

Author(s)

Joshua Lambert, Pedro Neves

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
default_pars <- create_default_pars(
  island_ontogeny = 0,
  sea_level = 0,
  area_pars = create_area_pars(
    max_area = 1000,
    proportional_peak_t = 0.1,
    peak_sharpness = 1,
    total_island_age = 10,
    sea_level_amplitude = 1,
    sea_level_frequency = 10,
    island_gradient_angle = 0
  ),
  hyper_pars = create_hyper_pars(
    d_0 = 0,
    x = 0,
    alpha = 0,
    beta = 0
  ),
  dist_pars = create_dist_pars(D = 25000),
  ext_pars = c(5, 10),
  totaltime = 15,
  pars = c(2, 1, 0.05, 0.001, 1)
)

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