network.gsa: Sample under the Generalized Sampling Approach

View source: R/network.gsa.R

network.gsaR Documentation

Sample under the Generalized Sampling Approach

Description

Takes a phylogeny and samples a period where n lineages exist. This method properly samples n taxa under the GSA

Usage

network.gsa(net, ntaxa, complete = TRUE, frac = 1, stochsampling = FALSE)

Arguments

net

A network to sample phylogenies.

ntaxa

The number of desired taxa.

complete

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

frac

Sampling fraction: The proportion of extant tips included in the phylogeny (incomplete sampling).

stochsampling

When stochsampling=TRUE: Each extant tip is included into the final tree with probability frac.

Value

A network with n extant taxa

Examples

set.seed(10)
ssa_net <-sim.bdh.taxa.ssa(n=20,numbsim=1,
lambda=1,mu=0.2,
nu=0.25, hybprops = c(1/3,1/3,1/3),
hyb.inher.fxn = make.beta.draw(1,1),
)[[1]]
gsa_net<-network.gsa(ssa_net,5)



jjustison/SiPhyNetwork documentation built on Sept. 14, 2024, 8:58 a.m.