network.gsa {SiPhyNetwork} | R 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 |
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)
[Package SiPhyNetwork version 1.1.0 Index]