sim_island: Simulates the island given rates and a mainland clade

View source: R/sim_island.R

sim_islandR Documentation

Simulates the island given rates and a mainland clade

Description

Simulates the island given rates and a mainland clade

Usage

sim_island(
  total_time,
  island_pars,
  mainland_clade,
  mainland_sample_prob,
  mainland_sample_type
)

Arguments

total_time

Numeric defining the length of the simulation in time units.

island_pars

A numeric vector containing the parameters for the island:

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

  • island_pars[2]: mu (extinction rate)

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

  • island_pars[4]: gamma (immigration rate)

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

mainland_clade

Data frame with state of mainland, see create_test_mainland_clade()

mainland_sample_prob

Numeric between zero and one determining the probability of an extant mainland species being sampled.

mainland_sample_type

String either "unsampled" for unsampled known species on the mainland, "undiscovered" for undiscovered species on the mainland, or "complete" if the mainland sampling probability is one.

Value

A list of two elements. The first element is ideal_island, and the second element is empirical_island. Within each of these is a list containing 3 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⁠: An integer ranging from 1 to 6 indicating the status of the colonist:

    1. Non_endemic_MaxAge

    2. Endemic

    3. Endemic&Non_Endemic

    4. Non_endemic

    5. Endemic_singleton_MaxAge

    6. Endemic_clade_MaxAge

  • ⁠$missing_species⁠: number of island species that were not sampled for particular clade (only applicable for endemic clades)

Author(s)

Joshua W. Lambert


joshwlambert/DAISIEmainland documentation built on July 14, 2024, 5:40 p.m.