sim.fbd.age: sim.fbd.age: Simulating fossilized birth-death trees of a...

Description Usage Arguments Value Examples

View source: R/sim.fbd.R

Description

sim.fbd.age: Simulating fossilized birth-death trees of a fixed age.

Usage

1
2
sim.fbd.age(age, numbsim, lambda, mu, psi, frac = 1, mrca = FALSE,
  complete = FALSE, K = 0)

Arguments

age

Time since origin / most recent common ancestor.

numbsim

Number of trees to simulate.

lambda

Speciation rate.

mu

Extinction rate.

psi

Fossil sampling rate.

frac

Sampling fraction: The actual number of tips is n/frac, but only n tips are included (incomplete sampling).

mrca

If mrca=FALSE: age is the time since origin. If mrca=TRUE: age is the time since most recent common ancestor of the extant tips.

complete

If complete = TRUE, the tree with the extinct and non-sampled lineages is returned. If complete = FALSE, the extinct and non-sampled lineages are suppressed.

K

If K=0, then lambda is constant. If K>0, density-dependent speciation is assumed, with speciation rate = lambda(1-m/K) when there are m extant species.

Value

Array of 'numbsim' SAtrees with the time since origin / most recent common ancestor being 'age'. If tree goes extinct or no tips are sampled (only possible when mrca = FALSE), return value is '0'. If only one extant and no extinct tips are sampled, return value is '1'.

Examples

1
2
3
4
5
6
age = 1
lambda = 2.0
mu = 0.5
psi = 0.6
numbsim = 2
sim.fbd.age(age, numbsim, lambda, mu, psi)

rachelwarnock/fossilsim documentation built on Oct. 27, 2019, 9:26 a.m.