sim_BD: Function to simulate a birth-death-fossilization process.

Description Usage Arguments Value

View source: R/sim_BD.R

Description

This function simulates a birth-death process with a fossilization/sampling scheme. Rates of speciation and extinction can be dependent on time t and standing diversity/richness, n. Sampling rates can be dependent om time.

Usage

1
sim_BD(spec = 0.1, ext = 0.02, samp = 0.3, n_init = 100, dt_ints = rep(1, 10))

Arguments

spec

Speciation rate. Either given as a fixed rate or as a function of time (t) and richness (n). Defaults to 0.1.

ext

Extinction rate. Given as fixed rate or function of time and richness. Defaults to 0.001.

samp

Sampling rate, given as fixed rate or function of time (t) only. Defaults to 0.3

n_init

Initial number of lineages. Defaults to 100.

dt_ints

Array of 'intervals' in which to generate the fossil record, as an array of interval durations. All lineages sampled within these intervals are placed in the interval, regardless of precise time it was sampled for the output FosRec. Defaults to rep(1,10)

Value

A named list with Taxa (time of origin and extinction of all taxa), Foss (list of all fossilization/sampling event for all taxa), FosRec (occurrence matrix with dimensions sampled species by intervals). The remainding entries in the list are the inputs given to the function, dts, Spec, Ext, Samp, n_init


josteist/Compadre documentation built on June 3, 2021, 1:02 p.m.