Skip to contents

Simulates a dated phylogenetic tree under the structured coalescent model

Usage

rstrphylo(
  n,
  d,
  coalescent_rates = 1/effective_population_sizes,
  migration_matrix,
  tip_data = cbind(1:n, 0, rep_len(1:d, n)),
  effective_population_sizes = 1/coalescent_rates
)

Arguments

n

Number of samples

d

Number of demes

coalescent_rates

Numeric vector giving coalescent rates (inverse effective population sizes) of each deme

migration_matrix

Numeric matrix giving backwards-in-t migration rates between each pair of demes

tip_data

nx3 matrix with first column giving tip labels, second column giving tip ages and third column giving tip demes

Value

An object of class 'strphylo'