sim.genespeciestree: sim.genespeciestree: Simulating birth-death species trees...

Description Usage Arguments Value Author(s) References Examples

Description

sim.genespeciestree simulates birth-death species trees (using sim.bd.taxa or sim.bd.taxa.age). Within each species tree, a gene tree is simulated, assuming a coalescent with coalescent rate being 1. The method returns summary statistics for the gene tree.

Usage

1
sim.genespeciestree(n, numbsim, lambda, mu, frac = 1, age=0)

Arguments

n

Number of extant sampled tips.

numbsim

Number of trees to simulate.

lambda

Speciation rate.

mu

Extinction rate.

frac

Each tip is included into the final species tree with probability frac.

age

The time since origin / most recent common ancestor. If age = 0 (default) a uniform prior for the time since origin is assumed.

Value

statistics

For each simulated gene tree the following statistics are returned (with "gammaspecies" being the gamma statistic for the corresponding species tree): "Colless","s","Sackin","cherries","matching of species tree and gene tree","gammaspecies","gamma".

Author(s)

Tanja Stadler

References

T. Stadler, J. Degnan, N. Rosenberg. Manuscript.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#Simulate two gene trees within two species trees:
n<-10
lambda <- 2.0
mu <- 0.5
frac <-0.6
numbsim<-2
age<-2

# Simulation is conditioned on 10 final tips
sim.genespeciestree(n, numbsim, lambda, mu, frac, 0)

# Simulation is conditioned on 10 final tips and tree age 2
sim.genespeciestree(n, numbsim, lambda, mu, frac, age)

tanja819/TreeSim documentation built on May 31, 2019, 2:57 a.m.