sim.fbd.taxa: sim.fbd.taxa: Simulating fossilized birth-death trees on a...

View source: R/sim.fbd.R

sim.fbd.taxaR Documentation

sim.fbd.taxa: Simulating fossilized birth-death trees on a fixed number of extant taxa.

Description

sim.fbd.taxa: Simulating fossilized birth-death trees on a fixed number of extant taxa.

Usage

sim.fbd.taxa(n, numbsim, lambda, mu, psi, frac = 1, complete = FALSE)

Arguments

n

Number of extant sampled tips.

numbsim

Number of trees to simulate.

lambda

Speciation rate.

mu

Extinction rate.

psi

Fossil sampling rate.

frac

Extant sampling fraction. When complete = FALSE, the actual (simulated) number of extant tips is n/frac, but only n tips are included in the result (incomplete sampling). When complete = TRUE: all unsampled lineages are included, i.e. the final tree has n/frac extant tips.

complete

whether to return the complete tree (with non-sampled lineages) or the reconstructed tree (with unsampled lineages removed).

Value

List of numbsim simulated SAtrees with n extant sampled tips.

Examples

n = 10
lambda = 2.0
mu = 0.5
psi = 0.6
numbsim = 2
if (requireNamespace("TreeSim", quietly = TRUE)) {
sim.fbd.taxa(n, numbsim, lambda, mu, psi)
}

FossilSim documentation built on Oct. 5, 2023, 5:08 p.m.