sim.fbd.rateshift.taxa: sim.fbd.rateshift.taxa: Simulating fossilized birth death...

Description Usage Arguments Value Examples

View source: R/sim.fbd.R

Description

sim.fbd.rateshift.taxa: Simulating fossilized birth death trees incorporating rate shifts.

Usage

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

Arguments

n

Number of extant sampled tips.

numbsim

Number of trees to simulate.

lambda

Vector of speciation rates, the rate in entry i is the speciation rate prior (ancestral) to time times[i].

mu

Vector of extinction rates, the rate in entry i is the extinction rate prior (ancestral) to time times[i].

psi

Vector of fossil sampling rates, the rate in entry i is the fossil sampling rate prior (ancestral) to time times[i].

times

Vector of mass extinction and rate shift times. Time is 0 today and increasing going backwards in time. Specify the vector as times[i]<times[i+1]. times[1]=0 (today).

complete

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

Value

List of numbsim simulated SAtrees with n extant sampled tips.

Examples

1
2
3
n = 10
numbsim = 1
sim.fbd.rateshift.taxa(n, numbsim, lambda = c(2,1), mu = c(0,0.3), psi = c(1,0.1), times = c(0,0.3))

FossilSim documentation built on April 6, 2021, 1:06 a.m.