Other packages > Find by keyword >

TreeSim  

Simulating Phylogenetic Trees
View on CRAN: Click here


Download and install TreeSim package within the R console
Install from CRAN:
install.packages("TreeSim")

Install from Github:
library("remotes")
install_github("cran/TreeSim")

Install by package version:
library("remotes")
install_version("TreeSim", "2.4")



Attach the package and use:
library("TreeSim")
Maintained by
Tanja Stadler
[Scholar Profile | Author Map]
First Published: 2010-02-23
Latest Update: 2019-04-08
Description:
Simulation methods for phylogenetic trees where (i) all tips are sampled at one time point or (ii) tips are sampled sequentially through time. (i) For sampling at one time point, simulations are performed under a constant rate birth-death process, conditioned on having a fixed number of final tips (sim.bd.taxa()), or a fixed age (sim.bd.age()), or a fixed age and number of tips (sim.bd.taxa.age()). When conditioning on the number of final tips, the method allows for shifts in rates and mass extinction events during the birth-death process (sim.rateshift.taxa()). The function sim.bd.age() (and sim.rateshift.taxa() without extinction) allow the speciation rate to change in a density-dependent way. The LTT plots of the simulations can be displayed using LTT.plot(), LTT.plot.gen() and LTT.average.root(). TreeSim further samples trees with n final tips from a set of trees generated by the common sampling algorithm stopping when a fixed number m>>n of tips is first reached (sim.gsa.taxa()). This latter method is appropriate for m-tip trees generated under a big class of models (details in the sim.gsa.taxa() man page). For incomplete phylogeny, the missing speciation events can be added through simulations (corsim()). (ii) sim.rateshifts.taxa() is generalized to sim.bdsky.stt() for serially sampled trees, where the trees are conditioned on either the number of sampled tips or the age. Furthermore, for a multitype-branching process with sequential sampling, trees on a fixed number of tips can be simulated using sim.bdtypes.stt.taxa(). This function further allows to simulate under epidemiological models with an exposed class. The function sim.genespeciestree() simulates coalescent gene trees within birth-death species trees, and sim.genetree() simulates coalescent gene trees.
How to cite:
Tanja Stadler (2010). TreeSim: Simulating Phylogenetic Trees. R package version 2.4, https://cran.r-project.org/web/packages/TreeSim. Accessed 05 May. 2025.
Previous versions and publish date:
1.0 (2010-02-23 17:18), 1.1 (2011-03-20 20:39), 1.3 (2011-05-10 18:08), 1.4 (2011-06-15 19:53), 1.5 (2011-11-02 18:17), 1.6 (2012-08-05 19:54), 1.7 (2012-11-20 12:34), 1.8 (2013-04-16 18:14), 1.9.1 (2013-12-10 10:07), 1.9 (2013-06-09 19:08), 2.0 (2014-07-28 21:39), 2.1 (2014-09-18 17:22), 2.2 (2015-10-05 17:07), 2.3 (2017-03-20 11:52)
Other packages that cited TreeSim R package
View TreeSim citation profile
Other R packages that TreeSim depends, imports, suggests or enhances
Complete documentation for TreeSim
Functions, R codes and Examples using the TreeSim R package
Some associated functions: LTT.plot.gen . LTT.plot . TreeSim-package . corsim . cuttree . getx . sim.bd.age . sim.bd.taxa.age . sim.bd.taxa . sim.bdsky.stt . sim.bdtypes.stt.taxa . sim.genespeciestree . sim.genetree . sim.gsa.taxa . sim.rateshift.taxa . 
Some associated R codes: LTT.average.root.R . LTT.general.R . LTT.plot.R . LTT.plot.gen.R . add.rootedge.R . age.nodes.R . age.tips.R . branching.times.complete.R . collapse.singles.R . corsim.R . cuttree.R . extinction.times.R . gamStat.R . get.times.polytomy.R . getnumbs.R . gettimelength.R . gettimeperiod.R . getx.R . intp1.R . numbspecies.R . reconstructed.age.R . reconstructed.taxa.R . reconstructed.taxa.single.R . sim.bd.age.R . sim.bd.age.help.R . sim.bd.age.loop.R . sim.bd.taxa.R . sim.bd.taxa.age.R . sim.bd.taxa.age.help.R . sim.bd.taxa.age.loop.R . sim.bd.taxa.help.R . sim.bd.taxa.loop.R . sim.bdsky.stt.R . sim.bdtypes.stt.taxa.R . sim.genespeciestree.R . sim.genetree.R . sim.gsa.taxa.R . sim.rateshift.taxa.R . sim.rateshift.taxa.help.R . sim.rateshift.taxa.loop.R . sim2.bd.R . sim2.bd.age.R . sim2.bd.fast.R . sim2.bd.fast.age.R . sim2.bd.fast.single.R . sim2.bd.fast.single.mrca.R . sim2.bd.fast.single.origin.R . sim2.bd.gsa.R . sim2.bd.mrca.R . sim2.bd.mrca.reconst.R . sim2.bd.origin.R . sim2.bd.rateshift.R . sim2.bd.rateshift.single.R . sim2.bd.reverse.R . sim2.bd.reverse.single.R . sim2.bd.ssa.R . sim2.gsa.R . stats.R .  Full TreeSim package functions and examples
Downloads during the last 30 days
04/0504/0604/0704/0804/0904/1004/1104/1204/1304/1404/1504/1604/1704/1804/1904/2004/2104/2204/2304/2404/2504/2604/2704/2804/2904/3005/0105/03Downloads for TreeSim510152025303540455055606570TrendBars

Today's Hot Picks in Authors and Packages

quickcode  
Quick and Essential 'R' Tricks for Better Scripts
The NOT functions, 'R' tricks and a compilation of some simple quick plus often used 'R' codes to im ...
Download / Learn more Package Citations See dependency  
cape  
Combined Analysis of Pleiotropy and Epistasis for Diversity Outbred Mice
Combined Analysis of Pleiotropy and Epistasis infers predictive networks between genetic variants a ...
Download / Learn more Package Citations See dependency  
pdqr  
Work with Custom Distribution Functions
Create, transform, and summarize custom random variables with distribution functions (analogues of ...
Download / Learn more Package Citations See dependency  
rsvd  
Randomized Singular Value Decomposition
Low-rank matrix decompositions are fundamental tools and widely used for data analysis, dimension r ...
Download / Learn more Package Citations See dependency  
lifecourse  
Quantification of Lifecourse Fluidity
Provides in built datasets and three functions. These functions are mobility_index, nonStanTest and ...
Download / Learn more Package Citations See dependency  
BINCOR  
Estimate the Correlation Between Two Irregular Time Series
Estimate the correlation between two irregular time series that are not necessarily sampled on ident ...
Download / Learn more Package Citations See dependency  

24,187

R Packages

207,311

Dependencies

65,312

Author Associations

24,143

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA